mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e8dce79953a38a31/out/
uavionix.rs

1#![doc = "MAVLink uAvionix dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Generalized UAVCAN node health"]
4409pub enum UavcanNodeHealth {
4410    #[doc = "The node is functioning properly."]
4411    UAVCAN_NODE_HEALTH_OK = 0,
4412    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4413    UAVCAN_NODE_HEALTH_WARNING = 1,
4414    #[doc = "The node has encountered a major failure."]
4415    UAVCAN_NODE_HEALTH_ERROR = 2,
4416    #[doc = "The node has suffered a fatal malfunction."]
4417    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4418}
4419impl UavcanNodeHealth {
4420    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4421}
4422impl Default for UavcanNodeHealth {
4423    fn default() -> Self {
4424        Self::DEFAULT
4425    }
4426}
4427#[cfg_attr(feature = "ts", derive(TS))]
4428#[cfg_attr(feature = "ts", ts(export))]
4429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4431#[cfg_attr(feature = "serde", serde(tag = "type"))]
4432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4433#[repr(u32)]
4434#[doc = "Generalized UAVCAN node mode"]
4435pub enum UavcanNodeMode {
4436    #[doc = "The node is performing its primary functions."]
4437    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4438    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4439    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4440    #[doc = "The node is under maintenance."]
4441    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4442    #[doc = "The node is in the process of updating its software."]
4443    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4444    #[doc = "The node is no longer available online."]
4445    UAVCAN_NODE_MODE_OFFLINE = 7,
4446}
4447impl UavcanNodeMode {
4448    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4449}
4450impl Default for UavcanNodeMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455#[cfg_attr(feature = "ts", derive(TS))]
4456#[cfg_attr(feature = "ts", ts(export))]
4457#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4459#[cfg_attr(feature = "serde", serde(tag = "type"))]
4460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4461#[repr(u32)]
4462#[doc = "Emergency status encoding"]
4463pub enum UavionixAdsbEmergencyStatus {
4464    UAVIONIX_ADSB_OUT_NO_EMERGENCY = 0,
4465    UAVIONIX_ADSB_OUT_GENERAL_EMERGENCY = 1,
4466    UAVIONIX_ADSB_OUT_LIFEGUARD_EMERGENCY = 2,
4467    UAVIONIX_ADSB_OUT_MINIMUM_FUEL_EMERGENCY = 3,
4468    UAVIONIX_ADSB_OUT_NO_COMM_EMERGENCY = 4,
4469    UAVIONIX_ADSB_OUT_UNLAWFUL_INTERFERANCE_EMERGENCY = 5,
4470    UAVIONIX_ADSB_OUT_DOWNED_AIRCRAFT_EMERGENCY = 6,
4471    UAVIONIX_ADSB_OUT_RESERVED = 7,
4472}
4473impl UavionixAdsbEmergencyStatus {
4474    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_NO_EMERGENCY;
4475}
4476impl Default for UavionixAdsbEmergencyStatus {
4477    fn default() -> Self {
4478        Self::DEFAULT
4479    }
4480}
4481#[cfg_attr(feature = "ts", derive(TS))]
4482#[cfg_attr(feature = "ts", ts(export))]
4483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4485#[cfg_attr(feature = "serde", serde(tag = "type"))]
4486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4487#[repr(u32)]
4488#[doc = "Definitions for aircraft size"]
4489pub enum UavionixAdsbOutCfgAircraftSize {
4490    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA = 0,
4491    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L15M_W23M = 1,
4492    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25M_W28P5M = 2,
4493    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25_34M = 3,
4494    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_33M = 4,
4495    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_38M = 5,
4496    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_39P5M = 6,
4497    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_45M = 7,
4498    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_45M = 8,
4499    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_52M = 9,
4500    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_59P5M = 10,
4501    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_67M = 11,
4502    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W72P5M = 12,
4503    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W80M = 13,
4504    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W80M = 14,
4505    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W90M = 15,
4506}
4507impl UavionixAdsbOutCfgAircraftSize {
4508    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA;
4509}
4510impl Default for UavionixAdsbOutCfgAircraftSize {
4511    fn default() -> Self {
4512        Self::DEFAULT
4513    }
4514}
4515#[cfg_attr(feature = "ts", derive(TS))]
4516#[cfg_attr(feature = "ts", ts(export))]
4517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4519#[cfg_attr(feature = "serde", serde(tag = "type"))]
4520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4521#[repr(u32)]
4522#[doc = "GPS lataral offset encoding"]
4523pub enum UavionixAdsbOutCfgGpsOffsetLat {
4524    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA = 0,
4525    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_2M = 1,
4526    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_4M = 2,
4527    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_6M = 3,
4528    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_0M = 4,
4529    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_2M = 5,
4530    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_4M = 6,
4531    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_6M = 7,
4532}
4533impl UavionixAdsbOutCfgGpsOffsetLat {
4534    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA;
4535}
4536impl Default for UavionixAdsbOutCfgGpsOffsetLat {
4537    fn default() -> Self {
4538        Self::DEFAULT
4539    }
4540}
4541#[cfg_attr(feature = "ts", derive(TS))]
4542#[cfg_attr(feature = "ts", ts(export))]
4543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4545#[cfg_attr(feature = "serde", serde(tag = "type"))]
4546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4547#[repr(u32)]
4548#[doc = "GPS longitudinal offset encoding"]
4549pub enum UavionixAdsbOutCfgGpsOffsetLon {
4550    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA = 0,
4551    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_APPLIED_BY_SENSOR = 1,
4552}
4553impl UavionixAdsbOutCfgGpsOffsetLon {
4554    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA;
4555}
4556impl Default for UavionixAdsbOutCfgGpsOffsetLon {
4557    fn default() -> Self {
4558        Self::DEFAULT
4559    }
4560}
4561bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutControlState : u8 { const UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED = 1 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_ON_GROUND = 4 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_IDENT_BUTTON_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_1090ES_TX_ENABLED = 128 ; } }
4562impl UavionixAdsbOutControlState {
4563    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED;
4564}
4565impl Default for UavionixAdsbOutControlState {
4566    fn default() -> Self {
4567        Self::DEFAULT
4568    }
4569}
4570#[cfg_attr(feature = "ts", derive(TS))]
4571#[cfg_attr(feature = "ts", ts(export))]
4572#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4574#[cfg_attr(feature = "serde", serde(tag = "type"))]
4575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4576#[repr(u32)]
4577#[doc = "Status for ADS-B transponder dynamic input"]
4578pub enum UavionixAdsbOutDynamicGpsFix {
4579    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0 = 0,
4580    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_1 = 1,
4581    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_2D = 2,
4582    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_3D = 3,
4583    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_DGPS = 4,
4584    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_RTK = 5,
4585}
4586impl UavionixAdsbOutDynamicGpsFix {
4587    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0;
4588}
4589impl Default for UavionixAdsbOutDynamicGpsFix {
4590    fn default() -> Self {
4591        Self::DEFAULT
4592    }
4593}
4594bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutDynamicState : u16 { const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE = 1 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_AUTOPILOT_ENABLED = 2 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_NICBARO_CROSSCHECKED = 4 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_ON_GROUND = 8 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_IDENT = 16 ; } }
4595impl UavionixAdsbOutDynamicState {
4596    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE;
4597}
4598impl Default for UavionixAdsbOutDynamicState {
4599    fn default() -> Self {
4600        Self::DEFAULT
4601    }
4602}
4603bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Transceiver RF control flags for ADS-B transponder dynamic reports"] pub struct UavionixAdsbOutRfSelect : u8 { const UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED = 1 ; const UAVIONIX_ADSB_OUT_RF_SELECT_TX_ENABLED = 2 ; } }
4604impl UavionixAdsbOutRfSelect {
4605    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED;
4606}
4607impl Default for UavionixAdsbOutRfSelect {
4608    fn default() -> Self {
4609        Self::DEFAULT
4610    }
4611}
4612bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder fault report"] pub struct UavionixAdsbOutStatusFault : u8 { const UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL = 8 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_NO_POS = 16 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_UNAVAIL = 32 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_TX_SYSTEM_FAIL = 64 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_MAINT_REQ = 128 ; } }
4613impl UavionixAdsbOutStatusFault {
4614    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL;
4615}
4616impl Default for UavionixAdsbOutStatusFault {
4617    fn default() -> Self {
4618        Self::DEFAULT
4619    }
4620}
4621#[cfg_attr(feature = "ts", derive(TS))]
4622#[cfg_attr(feature = "ts", ts(export))]
4623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4625#[cfg_attr(feature = "serde", serde(tag = "type"))]
4626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4627#[repr(u32)]
4628#[doc = "State flags for ADS-B transponder status report"]
4629pub enum UavionixAdsbOutStatusNicNacp {
4630    UAVIONIX_ADSB_NIC_CR_20_NM = 1,
4631    UAVIONIX_ADSB_NIC_CR_8_NM = 2,
4632    UAVIONIX_ADSB_NIC_CR_4_NM = 3,
4633    UAVIONIX_ADSB_NIC_CR_2_NM = 4,
4634    UAVIONIX_ADSB_NIC_CR_1_NM = 5,
4635    UAVIONIX_ADSB_NIC_CR_0_3_NM = 6,
4636    UAVIONIX_ADSB_NIC_CR_0_2_NM = 7,
4637    UAVIONIX_ADSB_NIC_CR_0_1_NM = 8,
4638    UAVIONIX_ADSB_NIC_CR_75_M = 9,
4639    UAVIONIX_ADSB_NIC_CR_25_M = 10,
4640    UAVIONIX_ADSB_NIC_CR_7_5_M = 11,
4641    UAVIONIX_ADSB_NACP_EPU_10_NM = 16,
4642    UAVIONIX_ADSB_NACP_EPU_4_NM = 32,
4643    UAVIONIX_ADSB_NACP_EPU_2_NM = 48,
4644    UAVIONIX_ADSB_NACP_EPU_1_NM = 64,
4645    UAVIONIX_ADSB_NACP_EPU_0_5_NM = 80,
4646    UAVIONIX_ADSB_NACP_EPU_0_3_NM = 96,
4647    UAVIONIX_ADSB_NACP_EPU_0_1_NM = 112,
4648    UAVIONIX_ADSB_NACP_EPU_0_05_NM = 128,
4649    UAVIONIX_ADSB_NACP_EPU_30_M = 144,
4650    UAVIONIX_ADSB_NACP_EPU_10_M = 160,
4651    UAVIONIX_ADSB_NACP_EPU_3_M = 176,
4652}
4653impl UavionixAdsbOutStatusNicNacp {
4654    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_NIC_CR_20_NM;
4655}
4656impl Default for UavionixAdsbOutStatusNicNacp {
4657    fn default() -> Self {
4658        Self::DEFAULT
4659    }
4660}
4661bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder status report"] pub struct UavionixAdsbOutStatusState : u8 { const UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND = 1 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_INTERROGATED_SINCE_LAST = 2 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_XBIT_ENABLED = 4 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_IDENT_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_1090ES_TX_ENABLED = 128 ; } }
4662impl UavionixAdsbOutStatusState {
4663    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND;
4664}
4665impl Default for UavionixAdsbOutStatusState {
4666    fn default() -> Self {
4667        Self::DEFAULT
4668    }
4669}
4670bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Status flags for ADS-B transponder dynamic output"] pub struct UavionixAdsbRfHealth : u8 { const UAVIONIX_ADSB_RF_HEALTH_OK = 1 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_TX = 2 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_RX = 16 ; } }
4671impl UavionixAdsbRfHealth {
4672    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_RF_HEALTH_OK;
4673}
4674impl Default for UavionixAdsbRfHealth {
4675    fn default() -> Self {
4676        Self::DEFAULT
4677    }
4678}
4679bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for X-Bit and reserved fields."] pub struct UavionixAdsbXbit : u8 { const UAVIONIX_ADSB_XBIT_ENABLED = 128 ; } }
4680impl UavionixAdsbXbit {
4681    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_XBIT_ENABLED;
4682}
4683impl Default for UavionixAdsbXbit {
4684    fn default() -> Self {
4685        Self::DEFAULT
4686    }
4687}
4688bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4689impl UtmDataAvailFlags {
4690    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4691}
4692impl Default for UtmDataAvailFlags {
4693    fn default() -> Self {
4694        Self::DEFAULT
4695    }
4696}
4697#[cfg_attr(feature = "ts", derive(TS))]
4698#[cfg_attr(feature = "ts", ts(export))]
4699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4701#[cfg_attr(feature = "serde", serde(tag = "type"))]
4702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4703#[repr(u32)]
4704#[doc = "Airborne status of UAS."]
4705pub enum UtmFlightState {
4706    #[doc = "The flight state can't be determined."]
4707    UTM_FLIGHT_STATE_UNKNOWN = 1,
4708    #[doc = "UAS on ground."]
4709    UTM_FLIGHT_STATE_GROUND = 2,
4710    #[doc = "UAS airborne."]
4711    UTM_FLIGHT_STATE_AIRBORNE = 3,
4712    #[doc = "UAS is in an emergency flight state."]
4713    UTM_FLIGHT_STATE_EMERGENCY = 16,
4714    #[doc = "UAS has no active controls."]
4715    UTM_FLIGHT_STATE_NOCTRL = 32,
4716}
4717impl UtmFlightState {
4718    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4719}
4720impl Default for UtmFlightState {
4721    fn default() -> Self {
4722        Self::DEFAULT
4723    }
4724}
4725#[cfg_attr(feature = "ts", derive(TS))]
4726#[cfg_attr(feature = "ts", ts(export))]
4727#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4729#[cfg_attr(feature = "serde", serde(tag = "type"))]
4730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4731#[repr(u32)]
4732#[doc = "Video stream encodings"]
4733pub enum VideoStreamEncoding {
4734    #[doc = "Stream encoding is unknown"]
4735    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4736    #[doc = "Stream encoding is H.264"]
4737    VIDEO_STREAM_ENCODING_H264 = 1,
4738    #[doc = "Stream encoding is H.265"]
4739    VIDEO_STREAM_ENCODING_H265 = 2,
4740}
4741impl VideoStreamEncoding {
4742    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4743}
4744impl Default for VideoStreamEncoding {
4745    fn default() -> Self {
4746        Self::DEFAULT
4747    }
4748}
4749bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4750impl VideoStreamStatusFlags {
4751    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4752}
4753impl Default for VideoStreamStatusFlags {
4754    fn default() -> Self {
4755        Self::DEFAULT
4756    }
4757}
4758#[cfg_attr(feature = "ts", derive(TS))]
4759#[cfg_attr(feature = "ts", ts(export))]
4760#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4762#[cfg_attr(feature = "serde", serde(tag = "type"))]
4763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4764#[repr(u32)]
4765#[doc = "Video stream types"]
4766pub enum VideoStreamType {
4767    #[doc = "Stream is RTSP"]
4768    VIDEO_STREAM_TYPE_RTSP = 0,
4769    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4770    VIDEO_STREAM_TYPE_RTPUDP = 1,
4771    #[doc = "Stream is MPEG on TCP"]
4772    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4773    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4774    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4775}
4776impl VideoStreamType {
4777    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4778}
4779impl Default for VideoStreamType {
4780    fn default() -> Self {
4781        Self::DEFAULT
4782    }
4783}
4784#[cfg_attr(feature = "ts", derive(TS))]
4785#[cfg_attr(feature = "ts", ts(export))]
4786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4788#[cfg_attr(feature = "serde", serde(tag = "type"))]
4789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4790#[repr(u32)]
4791#[doc = "Direction of VTOL transition"]
4792pub enum VtolTransitionHeading {
4793    #[doc = "Respect the heading configuration of the vehicle."]
4794    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4795    #[doc = "Use the heading pointing towards the next waypoint."]
4796    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4797    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4798    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4799    #[doc = "Use the specified heading in parameter 4."]
4800    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4801    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4802    VTOL_TRANSITION_HEADING_ANY = 4,
4803}
4804impl VtolTransitionHeading {
4805    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4806}
4807impl Default for VtolTransitionHeading {
4808    fn default() -> Self {
4809        Self::DEFAULT
4810    }
4811}
4812#[cfg_attr(feature = "ts", derive(TS))]
4813#[cfg_attr(feature = "ts", ts(export))]
4814#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4816#[cfg_attr(feature = "serde", serde(tag = "type"))]
4817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4818#[repr(u32)]
4819#[doc = "WiFi Mode."]
4820pub enum WifiConfigApMode {
4821    #[doc = "WiFi mode is undefined."]
4822    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4823    #[doc = "WiFi configured as an access point."]
4824    WIFI_CONFIG_AP_MODE_AP = 1,
4825    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4826    WIFI_CONFIG_AP_MODE_STATION = 2,
4827    #[doc = "WiFi disabled."]
4828    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4829}
4830impl WifiConfigApMode {
4831    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4832}
4833impl Default for WifiConfigApMode {
4834    fn default() -> Self {
4835        Self::DEFAULT
4836    }
4837}
4838#[cfg_attr(feature = "ts", derive(TS))]
4839#[cfg_attr(feature = "ts", ts(export))]
4840#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4842#[cfg_attr(feature = "serde", serde(tag = "type"))]
4843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4844#[repr(u32)]
4845#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4846pub enum WifiConfigApResponse {
4847    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4848    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4849    #[doc = "Changes accepted."]
4850    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4851    #[doc = "Changes rejected."]
4852    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4853    #[doc = "Invalid Mode."]
4854    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4855    #[doc = "Invalid SSID."]
4856    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4857    #[doc = "Invalid Password."]
4858    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4859}
4860impl WifiConfigApResponse {
4861    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4862}
4863impl Default for WifiConfigApResponse {
4864    fn default() -> Self {
4865        Self::DEFAULT
4866    }
4867}
4868#[cfg_attr(feature = "ts", derive(TS))]
4869#[cfg_attr(feature = "ts", ts(export))]
4870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4872#[cfg_attr(feature = "serde", serde(tag = "type"))]
4873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4874#[repr(u32)]
4875#[doc = "Winch actions."]
4876pub enum WinchActions {
4877    #[doc = "Allow motor to freewheel."]
4878    WINCH_RELAXED = 0,
4879    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4880    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4881    #[doc = "Wind or unwind line at specified rate."]
4882    WINCH_RATE_CONTROL = 2,
4883    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4884    WINCH_LOCK = 3,
4885    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4886    WINCH_DELIVER = 4,
4887    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4888    WINCH_HOLD = 5,
4889    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4890    WINCH_RETRACT = 6,
4891    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4892    WINCH_LOAD_LINE = 7,
4893    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4894    WINCH_ABANDON_LINE = 8,
4895    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4896    WINCH_LOAD_PAYLOAD = 9,
4897}
4898impl WinchActions {
4899    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4900}
4901impl Default for WinchActions {
4902    fn default() -> Self {
4903        Self::DEFAULT
4904    }
4905}
4906#[doc = "Set the vehicle attitude and body angular rates."]
4907#[doc = ""]
4908#[doc = "ID: 140"]
4909#[derive(Debug, Clone, PartialEq)]
4910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4912#[cfg_attr(feature = "ts", derive(TS))]
4913#[cfg_attr(feature = "ts", ts(export))]
4914pub struct ACTUATOR_CONTROL_TARGET_DATA {
4915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4916    pub time_usec: u64,
4917    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4919    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4920    pub controls: [f32; 8],
4921    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4922    pub group_mlx: u8,
4923}
4924impl ACTUATOR_CONTROL_TARGET_DATA {
4925    pub const ENCODED_LEN: usize = 41usize;
4926    pub const DEFAULT: Self = Self {
4927        time_usec: 0_u64,
4928        controls: [0.0_f32; 8usize],
4929        group_mlx: 0_u8,
4930    };
4931    #[cfg(feature = "arbitrary")]
4932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4933        use arbitrary::{Arbitrary, Unstructured};
4934        let mut buf = [0u8; 1024];
4935        rng.fill_bytes(&mut buf);
4936        let mut unstructured = Unstructured::new(&buf);
4937        Self::arbitrary(&mut unstructured).unwrap_or_default()
4938    }
4939}
4940impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4941    fn default() -> Self {
4942        Self::DEFAULT.clone()
4943    }
4944}
4945impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4946    type Message = MavMessage;
4947    const ID: u32 = 140u32;
4948    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4949    const EXTRA_CRC: u8 = 181u8;
4950    const ENCODED_LEN: usize = 41usize;
4951    fn deser(
4952        _version: MavlinkVersion,
4953        __input: &[u8],
4954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4955        let avail_len = __input.len();
4956        let mut payload_buf = [0; Self::ENCODED_LEN];
4957        let mut buf = if avail_len < Self::ENCODED_LEN {
4958            payload_buf[0..avail_len].copy_from_slice(__input);
4959            Bytes::new(&payload_buf)
4960        } else {
4961            Bytes::new(__input)
4962        };
4963        let mut __struct = Self::default();
4964        __struct.time_usec = buf.get_u64_le();
4965        for v in &mut __struct.controls {
4966            let val = buf.get_f32_le();
4967            *v = val;
4968        }
4969        __struct.group_mlx = buf.get_u8();
4970        Ok(__struct)
4971    }
4972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4973        let mut __tmp = BytesMut::new(bytes);
4974        #[allow(clippy::absurd_extreme_comparisons)]
4975        #[allow(unused_comparisons)]
4976        if __tmp.remaining() < Self::ENCODED_LEN {
4977            panic!(
4978                "buffer is too small (need {} bytes, but got {})",
4979                Self::ENCODED_LEN,
4980                __tmp.remaining(),
4981            )
4982        }
4983        __tmp.put_u64_le(self.time_usec);
4984        for val in &self.controls {
4985            __tmp.put_f32_le(*val);
4986        }
4987        __tmp.put_u8(self.group_mlx);
4988        if matches!(version, MavlinkVersion::V2) {
4989            let len = __tmp.len();
4990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4991        } else {
4992            __tmp.len()
4993        }
4994    }
4995}
4996#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4997#[doc = ""]
4998#[doc = "ID: 375"]
4999#[derive(Debug, Clone, PartialEq)]
5000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5002#[cfg_attr(feature = "ts", derive(TS))]
5003#[cfg_attr(feature = "ts", ts(export))]
5004pub struct ACTUATOR_OUTPUT_STATUS_DATA {
5005    #[doc = "Timestamp (since system boot)."]
5006    pub time_usec: u64,
5007    #[doc = "Active outputs"]
5008    pub active: u32,
5009    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
5010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5011    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5012    pub actuator: [f32; 32],
5013}
5014impl ACTUATOR_OUTPUT_STATUS_DATA {
5015    pub const ENCODED_LEN: usize = 140usize;
5016    pub const DEFAULT: Self = Self {
5017        time_usec: 0_u64,
5018        active: 0_u32,
5019        actuator: [0.0_f32; 32usize],
5020    };
5021    #[cfg(feature = "arbitrary")]
5022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5023        use arbitrary::{Arbitrary, Unstructured};
5024        let mut buf = [0u8; 1024];
5025        rng.fill_bytes(&mut buf);
5026        let mut unstructured = Unstructured::new(&buf);
5027        Self::arbitrary(&mut unstructured).unwrap_or_default()
5028    }
5029}
5030impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5031    fn default() -> Self {
5032        Self::DEFAULT.clone()
5033    }
5034}
5035impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5036    type Message = MavMessage;
5037    const ID: u32 = 375u32;
5038    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5039    const EXTRA_CRC: u8 = 251u8;
5040    const ENCODED_LEN: usize = 140usize;
5041    fn deser(
5042        _version: MavlinkVersion,
5043        __input: &[u8],
5044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5045        let avail_len = __input.len();
5046        let mut payload_buf = [0; Self::ENCODED_LEN];
5047        let mut buf = if avail_len < Self::ENCODED_LEN {
5048            payload_buf[0..avail_len].copy_from_slice(__input);
5049            Bytes::new(&payload_buf)
5050        } else {
5051            Bytes::new(__input)
5052        };
5053        let mut __struct = Self::default();
5054        __struct.time_usec = buf.get_u64_le();
5055        __struct.active = buf.get_u32_le();
5056        for v in &mut __struct.actuator {
5057            let val = buf.get_f32_le();
5058            *v = val;
5059        }
5060        Ok(__struct)
5061    }
5062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5063        let mut __tmp = BytesMut::new(bytes);
5064        #[allow(clippy::absurd_extreme_comparisons)]
5065        #[allow(unused_comparisons)]
5066        if __tmp.remaining() < Self::ENCODED_LEN {
5067            panic!(
5068                "buffer is too small (need {} bytes, but got {})",
5069                Self::ENCODED_LEN,
5070                __tmp.remaining(),
5071            )
5072        }
5073        __tmp.put_u64_le(self.time_usec);
5074        __tmp.put_u32_le(self.active);
5075        for val in &self.actuator {
5076            __tmp.put_f32_le(*val);
5077        }
5078        if matches!(version, MavlinkVersion::V2) {
5079            let len = __tmp.len();
5080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5081        } else {
5082            __tmp.len()
5083        }
5084    }
5085}
5086#[doc = "The location and information of an ADSB vehicle."]
5087#[doc = ""]
5088#[doc = "ID: 246"]
5089#[derive(Debug, Clone, PartialEq)]
5090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5092#[cfg_attr(feature = "ts", derive(TS))]
5093#[cfg_attr(feature = "ts", ts(export))]
5094pub struct ADSB_VEHICLE_DATA {
5095    #[doc = "ICAO address"]
5096    pub ICAO_address: u32,
5097    #[doc = "Latitude"]
5098    pub lat: i32,
5099    #[doc = "Longitude"]
5100    pub lon: i32,
5101    #[doc = "Altitude(ASL)"]
5102    pub altitude: i32,
5103    #[doc = "Course over ground"]
5104    pub heading: u16,
5105    #[doc = "The horizontal velocity"]
5106    pub hor_velocity: u16,
5107    #[doc = "The vertical velocity. Positive is up"]
5108    pub ver_velocity: i16,
5109    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5110    pub flags: AdsbFlags,
5111    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5112    pub squawk: u16,
5113    #[doc = "ADSB altitude type."]
5114    pub altitude_type: AdsbAltitudeType,
5115    #[doc = "The callsign, 8+null"]
5116    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5117    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5118    pub callsign: [u8; 9],
5119    #[doc = "ADSB emitter type."]
5120    pub emitter_type: AdsbEmitterType,
5121    #[doc = "Time since last communication in seconds"]
5122    pub tslc: u8,
5123}
5124impl ADSB_VEHICLE_DATA {
5125    pub const ENCODED_LEN: usize = 38usize;
5126    pub const DEFAULT: Self = Self {
5127        ICAO_address: 0_u32,
5128        lat: 0_i32,
5129        lon: 0_i32,
5130        altitude: 0_i32,
5131        heading: 0_u16,
5132        hor_velocity: 0_u16,
5133        ver_velocity: 0_i16,
5134        flags: AdsbFlags::DEFAULT,
5135        squawk: 0_u16,
5136        altitude_type: AdsbAltitudeType::DEFAULT,
5137        callsign: [0_u8; 9usize],
5138        emitter_type: AdsbEmitterType::DEFAULT,
5139        tslc: 0_u8,
5140    };
5141    #[cfg(feature = "arbitrary")]
5142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5143        use arbitrary::{Arbitrary, Unstructured};
5144        let mut buf = [0u8; 1024];
5145        rng.fill_bytes(&mut buf);
5146        let mut unstructured = Unstructured::new(&buf);
5147        Self::arbitrary(&mut unstructured).unwrap_or_default()
5148    }
5149}
5150impl Default for ADSB_VEHICLE_DATA {
5151    fn default() -> Self {
5152        Self::DEFAULT.clone()
5153    }
5154}
5155impl MessageData for ADSB_VEHICLE_DATA {
5156    type Message = MavMessage;
5157    const ID: u32 = 246u32;
5158    const NAME: &'static str = "ADSB_VEHICLE";
5159    const EXTRA_CRC: u8 = 184u8;
5160    const ENCODED_LEN: usize = 38usize;
5161    fn deser(
5162        _version: MavlinkVersion,
5163        __input: &[u8],
5164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5165        let avail_len = __input.len();
5166        let mut payload_buf = [0; Self::ENCODED_LEN];
5167        let mut buf = if avail_len < Self::ENCODED_LEN {
5168            payload_buf[0..avail_len].copy_from_slice(__input);
5169            Bytes::new(&payload_buf)
5170        } else {
5171            Bytes::new(__input)
5172        };
5173        let mut __struct = Self::default();
5174        __struct.ICAO_address = buf.get_u32_le();
5175        __struct.lat = buf.get_i32_le();
5176        __struct.lon = buf.get_i32_le();
5177        __struct.altitude = buf.get_i32_le();
5178        __struct.heading = buf.get_u16_le();
5179        __struct.hor_velocity = buf.get_u16_le();
5180        __struct.ver_velocity = buf.get_i16_le();
5181        let tmp = buf.get_u16_le();
5182        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5183            ::mavlink_core::error::ParserError::InvalidFlag {
5184                flag_type: "AdsbFlags",
5185                value: tmp as u32,
5186            },
5187        )?;
5188        __struct.squawk = buf.get_u16_le();
5189        let tmp = buf.get_u8();
5190        __struct.altitude_type =
5191            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5192                enum_type: "AdsbAltitudeType",
5193                value: tmp as u32,
5194            })?;
5195        for v in &mut __struct.callsign {
5196            let val = buf.get_u8();
5197            *v = val;
5198        }
5199        let tmp = buf.get_u8();
5200        __struct.emitter_type =
5201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5202                enum_type: "AdsbEmitterType",
5203                value: tmp as u32,
5204            })?;
5205        __struct.tslc = buf.get_u8();
5206        Ok(__struct)
5207    }
5208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5209        let mut __tmp = BytesMut::new(bytes);
5210        #[allow(clippy::absurd_extreme_comparisons)]
5211        #[allow(unused_comparisons)]
5212        if __tmp.remaining() < Self::ENCODED_LEN {
5213            panic!(
5214                "buffer is too small (need {} bytes, but got {})",
5215                Self::ENCODED_LEN,
5216                __tmp.remaining(),
5217            )
5218        }
5219        __tmp.put_u32_le(self.ICAO_address);
5220        __tmp.put_i32_le(self.lat);
5221        __tmp.put_i32_le(self.lon);
5222        __tmp.put_i32_le(self.altitude);
5223        __tmp.put_u16_le(self.heading);
5224        __tmp.put_u16_le(self.hor_velocity);
5225        __tmp.put_i16_le(self.ver_velocity);
5226        __tmp.put_u16_le(self.flags.bits());
5227        __tmp.put_u16_le(self.squawk);
5228        __tmp.put_u8(self.altitude_type as u8);
5229        for val in &self.callsign {
5230            __tmp.put_u8(*val);
5231        }
5232        __tmp.put_u8(self.emitter_type as u8);
5233        __tmp.put_u8(self.tslc);
5234        if matches!(version, MavlinkVersion::V2) {
5235            let len = __tmp.len();
5236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5237        } else {
5238            __tmp.len()
5239        }
5240    }
5241}
5242#[doc = "The location and information of an AIS vessel."]
5243#[doc = ""]
5244#[doc = "ID: 301"]
5245#[derive(Debug, Clone, PartialEq)]
5246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5248#[cfg_attr(feature = "ts", derive(TS))]
5249#[cfg_attr(feature = "ts", ts(export))]
5250pub struct AIS_VESSEL_DATA {
5251    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5252    pub MMSI: u32,
5253    #[doc = "Latitude"]
5254    pub lat: i32,
5255    #[doc = "Longitude"]
5256    pub lon: i32,
5257    #[doc = "Course over ground"]
5258    pub COG: u16,
5259    #[doc = "True heading"]
5260    pub heading: u16,
5261    #[doc = "Speed over ground"]
5262    pub velocity: u16,
5263    #[doc = "Distance from lat/lon location to bow"]
5264    pub dimension_bow: u16,
5265    #[doc = "Distance from lat/lon location to stern"]
5266    pub dimension_stern: u16,
5267    #[doc = "Time since last communication in seconds"]
5268    pub tslc: u16,
5269    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5270    pub flags: AisFlags,
5271    #[doc = "Turn rate"]
5272    pub turn_rate: i8,
5273    #[doc = "Navigational status"]
5274    pub navigational_status: AisNavStatus,
5275    #[doc = "Type of vessels"]
5276    pub mavtype: AisType,
5277    #[doc = "Distance from lat/lon location to port side"]
5278    pub dimension_port: u8,
5279    #[doc = "Distance from lat/lon location to starboard side"]
5280    pub dimension_starboard: u8,
5281    #[doc = "The vessel callsign"]
5282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5284    pub callsign: [u8; 7],
5285    #[doc = "The vessel name"]
5286    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5287    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5288    pub name: [u8; 20],
5289}
5290impl AIS_VESSEL_DATA {
5291    pub const ENCODED_LEN: usize = 58usize;
5292    pub const DEFAULT: Self = Self {
5293        MMSI: 0_u32,
5294        lat: 0_i32,
5295        lon: 0_i32,
5296        COG: 0_u16,
5297        heading: 0_u16,
5298        velocity: 0_u16,
5299        dimension_bow: 0_u16,
5300        dimension_stern: 0_u16,
5301        tslc: 0_u16,
5302        flags: AisFlags::DEFAULT,
5303        turn_rate: 0_i8,
5304        navigational_status: AisNavStatus::DEFAULT,
5305        mavtype: AisType::DEFAULT,
5306        dimension_port: 0_u8,
5307        dimension_starboard: 0_u8,
5308        callsign: [0_u8; 7usize],
5309        name: [0_u8; 20usize],
5310    };
5311    #[cfg(feature = "arbitrary")]
5312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5313        use arbitrary::{Arbitrary, Unstructured};
5314        let mut buf = [0u8; 1024];
5315        rng.fill_bytes(&mut buf);
5316        let mut unstructured = Unstructured::new(&buf);
5317        Self::arbitrary(&mut unstructured).unwrap_or_default()
5318    }
5319}
5320impl Default for AIS_VESSEL_DATA {
5321    fn default() -> Self {
5322        Self::DEFAULT.clone()
5323    }
5324}
5325impl MessageData for AIS_VESSEL_DATA {
5326    type Message = MavMessage;
5327    const ID: u32 = 301u32;
5328    const NAME: &'static str = "AIS_VESSEL";
5329    const EXTRA_CRC: u8 = 243u8;
5330    const ENCODED_LEN: usize = 58usize;
5331    fn deser(
5332        _version: MavlinkVersion,
5333        __input: &[u8],
5334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5335        let avail_len = __input.len();
5336        let mut payload_buf = [0; Self::ENCODED_LEN];
5337        let mut buf = if avail_len < Self::ENCODED_LEN {
5338            payload_buf[0..avail_len].copy_from_slice(__input);
5339            Bytes::new(&payload_buf)
5340        } else {
5341            Bytes::new(__input)
5342        };
5343        let mut __struct = Self::default();
5344        __struct.MMSI = buf.get_u32_le();
5345        __struct.lat = buf.get_i32_le();
5346        __struct.lon = buf.get_i32_le();
5347        __struct.COG = buf.get_u16_le();
5348        __struct.heading = buf.get_u16_le();
5349        __struct.velocity = buf.get_u16_le();
5350        __struct.dimension_bow = buf.get_u16_le();
5351        __struct.dimension_stern = buf.get_u16_le();
5352        __struct.tslc = buf.get_u16_le();
5353        let tmp = buf.get_u16_le();
5354        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5355            ::mavlink_core::error::ParserError::InvalidFlag {
5356                flag_type: "AisFlags",
5357                value: tmp as u32,
5358            },
5359        )?;
5360        __struct.turn_rate = buf.get_i8();
5361        let tmp = buf.get_u8();
5362        __struct.navigational_status =
5363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5364                enum_type: "AisNavStatus",
5365                value: tmp as u32,
5366            })?;
5367        let tmp = buf.get_u8();
5368        __struct.mavtype =
5369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5370                enum_type: "AisType",
5371                value: tmp as u32,
5372            })?;
5373        __struct.dimension_port = buf.get_u8();
5374        __struct.dimension_starboard = buf.get_u8();
5375        for v in &mut __struct.callsign {
5376            let val = buf.get_u8();
5377            *v = val;
5378        }
5379        for v in &mut __struct.name {
5380            let val = buf.get_u8();
5381            *v = val;
5382        }
5383        Ok(__struct)
5384    }
5385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5386        let mut __tmp = BytesMut::new(bytes);
5387        #[allow(clippy::absurd_extreme_comparisons)]
5388        #[allow(unused_comparisons)]
5389        if __tmp.remaining() < Self::ENCODED_LEN {
5390            panic!(
5391                "buffer is too small (need {} bytes, but got {})",
5392                Self::ENCODED_LEN,
5393                __tmp.remaining(),
5394            )
5395        }
5396        __tmp.put_u32_le(self.MMSI);
5397        __tmp.put_i32_le(self.lat);
5398        __tmp.put_i32_le(self.lon);
5399        __tmp.put_u16_le(self.COG);
5400        __tmp.put_u16_le(self.heading);
5401        __tmp.put_u16_le(self.velocity);
5402        __tmp.put_u16_le(self.dimension_bow);
5403        __tmp.put_u16_le(self.dimension_stern);
5404        __tmp.put_u16_le(self.tslc);
5405        __tmp.put_u16_le(self.flags.bits());
5406        __tmp.put_i8(self.turn_rate);
5407        __tmp.put_u8(self.navigational_status as u8);
5408        __tmp.put_u8(self.mavtype as u8);
5409        __tmp.put_u8(self.dimension_port);
5410        __tmp.put_u8(self.dimension_starboard);
5411        for val in &self.callsign {
5412            __tmp.put_u8(*val);
5413        }
5414        for val in &self.name {
5415            __tmp.put_u8(*val);
5416        }
5417        if matches!(version, MavlinkVersion::V2) {
5418            let len = __tmp.len();
5419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5420        } else {
5421            __tmp.len()
5422        }
5423    }
5424}
5425#[doc = "The current system altitude."]
5426#[doc = ""]
5427#[doc = "ID: 141"]
5428#[derive(Debug, Clone, PartialEq)]
5429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5431#[cfg_attr(feature = "ts", derive(TS))]
5432#[cfg_attr(feature = "ts", ts(export))]
5433pub struct ALTITUDE_DATA {
5434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5435    pub time_usec: u64,
5436    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5437    pub altitude_monotonic: f32,
5438    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5439    pub altitude_amsl: f32,
5440    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5441    pub altitude_local: f32,
5442    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5443    pub altitude_relative: f32,
5444    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5445    pub altitude_terrain: f32,
5446    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5447    pub bottom_clearance: f32,
5448}
5449impl ALTITUDE_DATA {
5450    pub const ENCODED_LEN: usize = 32usize;
5451    pub const DEFAULT: Self = Self {
5452        time_usec: 0_u64,
5453        altitude_monotonic: 0.0_f32,
5454        altitude_amsl: 0.0_f32,
5455        altitude_local: 0.0_f32,
5456        altitude_relative: 0.0_f32,
5457        altitude_terrain: 0.0_f32,
5458        bottom_clearance: 0.0_f32,
5459    };
5460    #[cfg(feature = "arbitrary")]
5461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5462        use arbitrary::{Arbitrary, Unstructured};
5463        let mut buf = [0u8; 1024];
5464        rng.fill_bytes(&mut buf);
5465        let mut unstructured = Unstructured::new(&buf);
5466        Self::arbitrary(&mut unstructured).unwrap_or_default()
5467    }
5468}
5469impl Default for ALTITUDE_DATA {
5470    fn default() -> Self {
5471        Self::DEFAULT.clone()
5472    }
5473}
5474impl MessageData for ALTITUDE_DATA {
5475    type Message = MavMessage;
5476    const ID: u32 = 141u32;
5477    const NAME: &'static str = "ALTITUDE";
5478    const EXTRA_CRC: u8 = 47u8;
5479    const ENCODED_LEN: usize = 32usize;
5480    fn deser(
5481        _version: MavlinkVersion,
5482        __input: &[u8],
5483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5484        let avail_len = __input.len();
5485        let mut payload_buf = [0; Self::ENCODED_LEN];
5486        let mut buf = if avail_len < Self::ENCODED_LEN {
5487            payload_buf[0..avail_len].copy_from_slice(__input);
5488            Bytes::new(&payload_buf)
5489        } else {
5490            Bytes::new(__input)
5491        };
5492        let mut __struct = Self::default();
5493        __struct.time_usec = buf.get_u64_le();
5494        __struct.altitude_monotonic = buf.get_f32_le();
5495        __struct.altitude_amsl = buf.get_f32_le();
5496        __struct.altitude_local = buf.get_f32_le();
5497        __struct.altitude_relative = buf.get_f32_le();
5498        __struct.altitude_terrain = buf.get_f32_le();
5499        __struct.bottom_clearance = buf.get_f32_le();
5500        Ok(__struct)
5501    }
5502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5503        let mut __tmp = BytesMut::new(bytes);
5504        #[allow(clippy::absurd_extreme_comparisons)]
5505        #[allow(unused_comparisons)]
5506        if __tmp.remaining() < Self::ENCODED_LEN {
5507            panic!(
5508                "buffer is too small (need {} bytes, but got {})",
5509                Self::ENCODED_LEN,
5510                __tmp.remaining(),
5511            )
5512        }
5513        __tmp.put_u64_le(self.time_usec);
5514        __tmp.put_f32_le(self.altitude_monotonic);
5515        __tmp.put_f32_le(self.altitude_amsl);
5516        __tmp.put_f32_le(self.altitude_local);
5517        __tmp.put_f32_le(self.altitude_relative);
5518        __tmp.put_f32_le(self.altitude_terrain);
5519        __tmp.put_f32_le(self.bottom_clearance);
5520        if matches!(version, MavlinkVersion::V2) {
5521            let len = __tmp.len();
5522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5523        } else {
5524            __tmp.len()
5525        }
5526    }
5527}
5528#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5529#[doc = ""]
5530#[doc = "ID: 30"]
5531#[derive(Debug, Clone, PartialEq)]
5532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5534#[cfg_attr(feature = "ts", derive(TS))]
5535#[cfg_attr(feature = "ts", ts(export))]
5536pub struct ATTITUDE_DATA {
5537    #[doc = "Timestamp (time since system boot)."]
5538    pub time_boot_ms: u32,
5539    #[doc = "Roll angle (-pi..+pi)"]
5540    pub roll: f32,
5541    #[doc = "Pitch angle (-pi..+pi)"]
5542    pub pitch: f32,
5543    #[doc = "Yaw angle (-pi..+pi)"]
5544    pub yaw: f32,
5545    #[doc = "Roll angular speed"]
5546    pub rollspeed: f32,
5547    #[doc = "Pitch angular speed"]
5548    pub pitchspeed: f32,
5549    #[doc = "Yaw angular speed"]
5550    pub yawspeed: f32,
5551}
5552impl ATTITUDE_DATA {
5553    pub const ENCODED_LEN: usize = 28usize;
5554    pub const DEFAULT: Self = Self {
5555        time_boot_ms: 0_u32,
5556        roll: 0.0_f32,
5557        pitch: 0.0_f32,
5558        yaw: 0.0_f32,
5559        rollspeed: 0.0_f32,
5560        pitchspeed: 0.0_f32,
5561        yawspeed: 0.0_f32,
5562    };
5563    #[cfg(feature = "arbitrary")]
5564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5565        use arbitrary::{Arbitrary, Unstructured};
5566        let mut buf = [0u8; 1024];
5567        rng.fill_bytes(&mut buf);
5568        let mut unstructured = Unstructured::new(&buf);
5569        Self::arbitrary(&mut unstructured).unwrap_or_default()
5570    }
5571}
5572impl Default for ATTITUDE_DATA {
5573    fn default() -> Self {
5574        Self::DEFAULT.clone()
5575    }
5576}
5577impl MessageData for ATTITUDE_DATA {
5578    type Message = MavMessage;
5579    const ID: u32 = 30u32;
5580    const NAME: &'static str = "ATTITUDE";
5581    const EXTRA_CRC: u8 = 39u8;
5582    const ENCODED_LEN: usize = 28usize;
5583    fn deser(
5584        _version: MavlinkVersion,
5585        __input: &[u8],
5586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5587        let avail_len = __input.len();
5588        let mut payload_buf = [0; Self::ENCODED_LEN];
5589        let mut buf = if avail_len < Self::ENCODED_LEN {
5590            payload_buf[0..avail_len].copy_from_slice(__input);
5591            Bytes::new(&payload_buf)
5592        } else {
5593            Bytes::new(__input)
5594        };
5595        let mut __struct = Self::default();
5596        __struct.time_boot_ms = buf.get_u32_le();
5597        __struct.roll = buf.get_f32_le();
5598        __struct.pitch = buf.get_f32_le();
5599        __struct.yaw = buf.get_f32_le();
5600        __struct.rollspeed = buf.get_f32_le();
5601        __struct.pitchspeed = buf.get_f32_le();
5602        __struct.yawspeed = buf.get_f32_le();
5603        Ok(__struct)
5604    }
5605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5606        let mut __tmp = BytesMut::new(bytes);
5607        #[allow(clippy::absurd_extreme_comparisons)]
5608        #[allow(unused_comparisons)]
5609        if __tmp.remaining() < Self::ENCODED_LEN {
5610            panic!(
5611                "buffer is too small (need {} bytes, but got {})",
5612                Self::ENCODED_LEN,
5613                __tmp.remaining(),
5614            )
5615        }
5616        __tmp.put_u32_le(self.time_boot_ms);
5617        __tmp.put_f32_le(self.roll);
5618        __tmp.put_f32_le(self.pitch);
5619        __tmp.put_f32_le(self.yaw);
5620        __tmp.put_f32_le(self.rollspeed);
5621        __tmp.put_f32_le(self.pitchspeed);
5622        __tmp.put_f32_le(self.yawspeed);
5623        if matches!(version, MavlinkVersion::V2) {
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5632#[doc = ""]
5633#[doc = "ID: 31"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_QUATERNION_DATA {
5640    #[doc = "Timestamp (time since system boot)."]
5641    pub time_boot_ms: u32,
5642    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5643    pub q1: f32,
5644    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5645    pub q2: f32,
5646    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5647    pub q3: f32,
5648    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5649    pub q4: f32,
5650    #[doc = "Roll angular speed"]
5651    pub rollspeed: f32,
5652    #[doc = "Pitch angular speed"]
5653    pub pitchspeed: f32,
5654    #[doc = "Yaw angular speed"]
5655    pub yawspeed: f32,
5656    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5660    pub repr_offset_q: [f32; 4],
5661}
5662impl ATTITUDE_QUATERNION_DATA {
5663    pub const ENCODED_LEN: usize = 48usize;
5664    pub const DEFAULT: Self = Self {
5665        time_boot_ms: 0_u32,
5666        q1: 0.0_f32,
5667        q2: 0.0_f32,
5668        q3: 0.0_f32,
5669        q4: 0.0_f32,
5670        rollspeed: 0.0_f32,
5671        pitchspeed: 0.0_f32,
5672        yawspeed: 0.0_f32,
5673        repr_offset_q: [0.0_f32; 4usize],
5674    };
5675    #[cfg(feature = "arbitrary")]
5676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5677        use arbitrary::{Arbitrary, Unstructured};
5678        let mut buf = [0u8; 1024];
5679        rng.fill_bytes(&mut buf);
5680        let mut unstructured = Unstructured::new(&buf);
5681        Self::arbitrary(&mut unstructured).unwrap_or_default()
5682    }
5683}
5684impl Default for ATTITUDE_QUATERNION_DATA {
5685    fn default() -> Self {
5686        Self::DEFAULT.clone()
5687    }
5688}
5689impl MessageData for ATTITUDE_QUATERNION_DATA {
5690    type Message = MavMessage;
5691    const ID: u32 = 31u32;
5692    const NAME: &'static str = "ATTITUDE_QUATERNION";
5693    const EXTRA_CRC: u8 = 246u8;
5694    const ENCODED_LEN: usize = 48usize;
5695    fn deser(
5696        _version: MavlinkVersion,
5697        __input: &[u8],
5698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5699        let avail_len = __input.len();
5700        let mut payload_buf = [0; Self::ENCODED_LEN];
5701        let mut buf = if avail_len < Self::ENCODED_LEN {
5702            payload_buf[0..avail_len].copy_from_slice(__input);
5703            Bytes::new(&payload_buf)
5704        } else {
5705            Bytes::new(__input)
5706        };
5707        let mut __struct = Self::default();
5708        __struct.time_boot_ms = buf.get_u32_le();
5709        __struct.q1 = buf.get_f32_le();
5710        __struct.q2 = buf.get_f32_le();
5711        __struct.q3 = buf.get_f32_le();
5712        __struct.q4 = buf.get_f32_le();
5713        __struct.rollspeed = buf.get_f32_le();
5714        __struct.pitchspeed = buf.get_f32_le();
5715        __struct.yawspeed = buf.get_f32_le();
5716        for v in &mut __struct.repr_offset_q {
5717            let val = buf.get_f32_le();
5718            *v = val;
5719        }
5720        Ok(__struct)
5721    }
5722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5723        let mut __tmp = BytesMut::new(bytes);
5724        #[allow(clippy::absurd_extreme_comparisons)]
5725        #[allow(unused_comparisons)]
5726        if __tmp.remaining() < Self::ENCODED_LEN {
5727            panic!(
5728                "buffer is too small (need {} bytes, but got {})",
5729                Self::ENCODED_LEN,
5730                __tmp.remaining(),
5731            )
5732        }
5733        __tmp.put_u32_le(self.time_boot_ms);
5734        __tmp.put_f32_le(self.q1);
5735        __tmp.put_f32_le(self.q2);
5736        __tmp.put_f32_le(self.q3);
5737        __tmp.put_f32_le(self.q4);
5738        __tmp.put_f32_le(self.rollspeed);
5739        __tmp.put_f32_le(self.pitchspeed);
5740        __tmp.put_f32_le(self.yawspeed);
5741        if matches!(version, MavlinkVersion::V2) {
5742            for val in &self.repr_offset_q {
5743                __tmp.put_f32_le(*val);
5744            }
5745            let len = __tmp.len();
5746            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5747        } else {
5748            __tmp.len()
5749        }
5750    }
5751}
5752#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5753#[doc = ""]
5754#[doc = "ID: 61"]
5755#[derive(Debug, Clone, PartialEq)]
5756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5758#[cfg_attr(feature = "ts", derive(TS))]
5759#[cfg_attr(feature = "ts", ts(export))]
5760pub struct ATTITUDE_QUATERNION_COV_DATA {
5761    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5762    pub time_usec: u64,
5763    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5765    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5766    pub q: [f32; 4],
5767    #[doc = "Roll angular speed"]
5768    pub rollspeed: f32,
5769    #[doc = "Pitch angular speed"]
5770    pub pitchspeed: f32,
5771    #[doc = "Yaw angular speed"]
5772    pub yawspeed: f32,
5773    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5776    pub covariance: [f32; 9],
5777}
5778impl ATTITUDE_QUATERNION_COV_DATA {
5779    pub const ENCODED_LEN: usize = 72usize;
5780    pub const DEFAULT: Self = Self {
5781        time_usec: 0_u64,
5782        q: [0.0_f32; 4usize],
5783        rollspeed: 0.0_f32,
5784        pitchspeed: 0.0_f32,
5785        yawspeed: 0.0_f32,
5786        covariance: [0.0_f32; 9usize],
5787    };
5788    #[cfg(feature = "arbitrary")]
5789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5790        use arbitrary::{Arbitrary, Unstructured};
5791        let mut buf = [0u8; 1024];
5792        rng.fill_bytes(&mut buf);
5793        let mut unstructured = Unstructured::new(&buf);
5794        Self::arbitrary(&mut unstructured).unwrap_or_default()
5795    }
5796}
5797impl Default for ATTITUDE_QUATERNION_COV_DATA {
5798    fn default() -> Self {
5799        Self::DEFAULT.clone()
5800    }
5801}
5802impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5803    type Message = MavMessage;
5804    const ID: u32 = 61u32;
5805    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5806    const EXTRA_CRC: u8 = 167u8;
5807    const ENCODED_LEN: usize = 72usize;
5808    fn deser(
5809        _version: MavlinkVersion,
5810        __input: &[u8],
5811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5812        let avail_len = __input.len();
5813        let mut payload_buf = [0; Self::ENCODED_LEN];
5814        let mut buf = if avail_len < Self::ENCODED_LEN {
5815            payload_buf[0..avail_len].copy_from_slice(__input);
5816            Bytes::new(&payload_buf)
5817        } else {
5818            Bytes::new(__input)
5819        };
5820        let mut __struct = Self::default();
5821        __struct.time_usec = buf.get_u64_le();
5822        for v in &mut __struct.q {
5823            let val = buf.get_f32_le();
5824            *v = val;
5825        }
5826        __struct.rollspeed = buf.get_f32_le();
5827        __struct.pitchspeed = buf.get_f32_le();
5828        __struct.yawspeed = buf.get_f32_le();
5829        for v in &mut __struct.covariance {
5830            let val = buf.get_f32_le();
5831            *v = val;
5832        }
5833        Ok(__struct)
5834    }
5835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5836        let mut __tmp = BytesMut::new(bytes);
5837        #[allow(clippy::absurd_extreme_comparisons)]
5838        #[allow(unused_comparisons)]
5839        if __tmp.remaining() < Self::ENCODED_LEN {
5840            panic!(
5841                "buffer is too small (need {} bytes, but got {})",
5842                Self::ENCODED_LEN,
5843                __tmp.remaining(),
5844            )
5845        }
5846        __tmp.put_u64_le(self.time_usec);
5847        for val in &self.q {
5848            __tmp.put_f32_le(*val);
5849        }
5850        __tmp.put_f32_le(self.rollspeed);
5851        __tmp.put_f32_le(self.pitchspeed);
5852        __tmp.put_f32_le(self.yawspeed);
5853        for val in &self.covariance {
5854            __tmp.put_f32_le(*val);
5855        }
5856        if matches!(version, MavlinkVersion::V2) {
5857            let len = __tmp.len();
5858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5859        } else {
5860            __tmp.len()
5861        }
5862    }
5863}
5864#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5865#[doc = ""]
5866#[doc = "ID: 83"]
5867#[derive(Debug, Clone, PartialEq)]
5868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5870#[cfg_attr(feature = "ts", derive(TS))]
5871#[cfg_attr(feature = "ts", ts(export))]
5872pub struct ATTITUDE_TARGET_DATA {
5873    #[doc = "Timestamp (time since system boot)."]
5874    pub time_boot_ms: u32,
5875    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5876    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5877    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5878    pub q: [f32; 4],
5879    #[doc = "Body roll rate"]
5880    pub body_roll_rate: f32,
5881    #[doc = "Body pitch rate"]
5882    pub body_pitch_rate: f32,
5883    #[doc = "Body yaw rate"]
5884    pub body_yaw_rate: f32,
5885    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5886    pub thrust: f32,
5887    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5888    pub type_mask: AttitudeTargetTypemask,
5889}
5890impl ATTITUDE_TARGET_DATA {
5891    pub const ENCODED_LEN: usize = 37usize;
5892    pub const DEFAULT: Self = Self {
5893        time_boot_ms: 0_u32,
5894        q: [0.0_f32; 4usize],
5895        body_roll_rate: 0.0_f32,
5896        body_pitch_rate: 0.0_f32,
5897        body_yaw_rate: 0.0_f32,
5898        thrust: 0.0_f32,
5899        type_mask: AttitudeTargetTypemask::DEFAULT,
5900    };
5901    #[cfg(feature = "arbitrary")]
5902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5903        use arbitrary::{Arbitrary, Unstructured};
5904        let mut buf = [0u8; 1024];
5905        rng.fill_bytes(&mut buf);
5906        let mut unstructured = Unstructured::new(&buf);
5907        Self::arbitrary(&mut unstructured).unwrap_or_default()
5908    }
5909}
5910impl Default for ATTITUDE_TARGET_DATA {
5911    fn default() -> Self {
5912        Self::DEFAULT.clone()
5913    }
5914}
5915impl MessageData for ATTITUDE_TARGET_DATA {
5916    type Message = MavMessage;
5917    const ID: u32 = 83u32;
5918    const NAME: &'static str = "ATTITUDE_TARGET";
5919    const EXTRA_CRC: u8 = 22u8;
5920    const ENCODED_LEN: usize = 37usize;
5921    fn deser(
5922        _version: MavlinkVersion,
5923        __input: &[u8],
5924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5925        let avail_len = __input.len();
5926        let mut payload_buf = [0; Self::ENCODED_LEN];
5927        let mut buf = if avail_len < Self::ENCODED_LEN {
5928            payload_buf[0..avail_len].copy_from_slice(__input);
5929            Bytes::new(&payload_buf)
5930        } else {
5931            Bytes::new(__input)
5932        };
5933        let mut __struct = Self::default();
5934        __struct.time_boot_ms = buf.get_u32_le();
5935        for v in &mut __struct.q {
5936            let val = buf.get_f32_le();
5937            *v = val;
5938        }
5939        __struct.body_roll_rate = buf.get_f32_le();
5940        __struct.body_pitch_rate = buf.get_f32_le();
5941        __struct.body_yaw_rate = buf.get_f32_le();
5942        __struct.thrust = buf.get_f32_le();
5943        let tmp = buf.get_u8();
5944        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5945            tmp & AttitudeTargetTypemask::all().bits(),
5946        )
5947        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5948            flag_type: "AttitudeTargetTypemask",
5949            value: tmp as u32,
5950        })?;
5951        Ok(__struct)
5952    }
5953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5954        let mut __tmp = BytesMut::new(bytes);
5955        #[allow(clippy::absurd_extreme_comparisons)]
5956        #[allow(unused_comparisons)]
5957        if __tmp.remaining() < Self::ENCODED_LEN {
5958            panic!(
5959                "buffer is too small (need {} bytes, but got {})",
5960                Self::ENCODED_LEN,
5961                __tmp.remaining(),
5962            )
5963        }
5964        __tmp.put_u32_le(self.time_boot_ms);
5965        for val in &self.q {
5966            __tmp.put_f32_le(*val);
5967        }
5968        __tmp.put_f32_le(self.body_roll_rate);
5969        __tmp.put_f32_le(self.body_pitch_rate);
5970        __tmp.put_f32_le(self.body_yaw_rate);
5971        __tmp.put_f32_le(self.thrust);
5972        __tmp.put_u8(self.type_mask.bits());
5973        if matches!(version, MavlinkVersion::V2) {
5974            let len = __tmp.len();
5975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5976        } else {
5977            __tmp.len()
5978        }
5979    }
5980}
5981#[doc = "Motion capture attitude and position."]
5982#[doc = ""]
5983#[doc = "ID: 138"]
5984#[derive(Debug, Clone, PartialEq)]
5985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5987#[cfg_attr(feature = "ts", derive(TS))]
5988#[cfg_attr(feature = "ts", ts(export))]
5989pub struct ATT_POS_MOCAP_DATA {
5990    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5991    pub time_usec: u64,
5992    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5993    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5994    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5995    pub q: [f32; 4],
5996    #[doc = "X position (NED)"]
5997    pub x: f32,
5998    #[doc = "Y position (NED)"]
5999    pub y: f32,
6000    #[doc = "Z position (NED)"]
6001    pub z: f32,
6002    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6003    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6006    pub covariance: [f32; 21],
6007}
6008impl ATT_POS_MOCAP_DATA {
6009    pub const ENCODED_LEN: usize = 120usize;
6010    pub const DEFAULT: Self = Self {
6011        time_usec: 0_u64,
6012        q: [0.0_f32; 4usize],
6013        x: 0.0_f32,
6014        y: 0.0_f32,
6015        z: 0.0_f32,
6016        covariance: [0.0_f32; 21usize],
6017    };
6018    #[cfg(feature = "arbitrary")]
6019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6020        use arbitrary::{Arbitrary, Unstructured};
6021        let mut buf = [0u8; 1024];
6022        rng.fill_bytes(&mut buf);
6023        let mut unstructured = Unstructured::new(&buf);
6024        Self::arbitrary(&mut unstructured).unwrap_or_default()
6025    }
6026}
6027impl Default for ATT_POS_MOCAP_DATA {
6028    fn default() -> Self {
6029        Self::DEFAULT.clone()
6030    }
6031}
6032impl MessageData for ATT_POS_MOCAP_DATA {
6033    type Message = MavMessage;
6034    const ID: u32 = 138u32;
6035    const NAME: &'static str = "ATT_POS_MOCAP";
6036    const EXTRA_CRC: u8 = 109u8;
6037    const ENCODED_LEN: usize = 120usize;
6038    fn deser(
6039        _version: MavlinkVersion,
6040        __input: &[u8],
6041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6042        let avail_len = __input.len();
6043        let mut payload_buf = [0; Self::ENCODED_LEN];
6044        let mut buf = if avail_len < Self::ENCODED_LEN {
6045            payload_buf[0..avail_len].copy_from_slice(__input);
6046            Bytes::new(&payload_buf)
6047        } else {
6048            Bytes::new(__input)
6049        };
6050        let mut __struct = Self::default();
6051        __struct.time_usec = buf.get_u64_le();
6052        for v in &mut __struct.q {
6053            let val = buf.get_f32_le();
6054            *v = val;
6055        }
6056        __struct.x = buf.get_f32_le();
6057        __struct.y = buf.get_f32_le();
6058        __struct.z = buf.get_f32_le();
6059        for v in &mut __struct.covariance {
6060            let val = buf.get_f32_le();
6061            *v = val;
6062        }
6063        Ok(__struct)
6064    }
6065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6066        let mut __tmp = BytesMut::new(bytes);
6067        #[allow(clippy::absurd_extreme_comparisons)]
6068        #[allow(unused_comparisons)]
6069        if __tmp.remaining() < Self::ENCODED_LEN {
6070            panic!(
6071                "buffer is too small (need {} bytes, but got {})",
6072                Self::ENCODED_LEN,
6073                __tmp.remaining(),
6074            )
6075        }
6076        __tmp.put_u64_le(self.time_usec);
6077        for val in &self.q {
6078            __tmp.put_f32_le(*val);
6079        }
6080        __tmp.put_f32_le(self.x);
6081        __tmp.put_f32_le(self.y);
6082        __tmp.put_f32_le(self.z);
6083        if matches!(version, MavlinkVersion::V2) {
6084            for val in &self.covariance {
6085                __tmp.put_f32_le(*val);
6086            }
6087            let len = __tmp.len();
6088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6089        } else {
6090            __tmp.len()
6091        }
6092    }
6093}
6094#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6095#[doc = ""]
6096#[doc = "ID: 7"]
6097#[derive(Debug, Clone, PartialEq)]
6098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6100#[cfg_attr(feature = "ts", derive(TS))]
6101#[cfg_attr(feature = "ts", ts(export))]
6102pub struct AUTH_KEY_DATA {
6103    #[doc = "key"]
6104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6105    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6106    pub key: [u8; 32],
6107}
6108impl AUTH_KEY_DATA {
6109    pub const ENCODED_LEN: usize = 32usize;
6110    pub const DEFAULT: Self = Self {
6111        key: [0_u8; 32usize],
6112    };
6113    #[cfg(feature = "arbitrary")]
6114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6115        use arbitrary::{Arbitrary, Unstructured};
6116        let mut buf = [0u8; 1024];
6117        rng.fill_bytes(&mut buf);
6118        let mut unstructured = Unstructured::new(&buf);
6119        Self::arbitrary(&mut unstructured).unwrap_or_default()
6120    }
6121}
6122impl Default for AUTH_KEY_DATA {
6123    fn default() -> Self {
6124        Self::DEFAULT.clone()
6125    }
6126}
6127impl MessageData for AUTH_KEY_DATA {
6128    type Message = MavMessage;
6129    const ID: u32 = 7u32;
6130    const NAME: &'static str = "AUTH_KEY";
6131    const EXTRA_CRC: u8 = 119u8;
6132    const ENCODED_LEN: usize = 32usize;
6133    fn deser(
6134        _version: MavlinkVersion,
6135        __input: &[u8],
6136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6137        let avail_len = __input.len();
6138        let mut payload_buf = [0; Self::ENCODED_LEN];
6139        let mut buf = if avail_len < Self::ENCODED_LEN {
6140            payload_buf[0..avail_len].copy_from_slice(__input);
6141            Bytes::new(&payload_buf)
6142        } else {
6143            Bytes::new(__input)
6144        };
6145        let mut __struct = Self::default();
6146        for v in &mut __struct.key {
6147            let val = buf.get_u8();
6148            *v = val;
6149        }
6150        Ok(__struct)
6151    }
6152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6153        let mut __tmp = BytesMut::new(bytes);
6154        #[allow(clippy::absurd_extreme_comparisons)]
6155        #[allow(unused_comparisons)]
6156        if __tmp.remaining() < Self::ENCODED_LEN {
6157            panic!(
6158                "buffer is too small (need {} bytes, but got {})",
6159                Self::ENCODED_LEN,
6160                __tmp.remaining(),
6161            )
6162        }
6163        for val in &self.key {
6164            __tmp.put_u8(*val);
6165        }
6166        if matches!(version, MavlinkVersion::V2) {
6167            let len = __tmp.len();
6168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6169        } else {
6170            __tmp.len()
6171        }
6172    }
6173}
6174#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6175#[doc = ""]
6176#[doc = "ID: 286"]
6177#[derive(Debug, Clone, PartialEq)]
6178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6180#[cfg_attr(feature = "ts", derive(TS))]
6181#[cfg_attr(feature = "ts", ts(export))]
6182pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6183    #[doc = "Timestamp (time since system boot)."]
6184    pub time_boot_us: u64,
6185    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6187    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6188    pub q: [f32; 4],
6189    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6190    pub q_estimated_delay_us: u32,
6191    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6192    pub vx: f32,
6193    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6194    pub vy: f32,
6195    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6196    pub vz: f32,
6197    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6198    pub v_estimated_delay_us: u32,
6199    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6200    pub feed_forward_angular_velocity_z: f32,
6201    #[doc = "Bitmap indicating which estimator outputs are valid."]
6202    pub estimator_status: EstimatorStatusFlags,
6203    #[doc = "System ID"]
6204    pub target_system: u8,
6205    #[doc = "Component ID"]
6206    pub target_component: u8,
6207    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6208    pub landed_state: MavLandedState,
6209    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6210    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6211    pub angular_velocity_z: f32,
6212}
6213impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6214    pub const ENCODED_LEN: usize = 57usize;
6215    pub const DEFAULT: Self = Self {
6216        time_boot_us: 0_u64,
6217        q: [0.0_f32; 4usize],
6218        q_estimated_delay_us: 0_u32,
6219        vx: 0.0_f32,
6220        vy: 0.0_f32,
6221        vz: 0.0_f32,
6222        v_estimated_delay_us: 0_u32,
6223        feed_forward_angular_velocity_z: 0.0_f32,
6224        estimator_status: EstimatorStatusFlags::DEFAULT,
6225        target_system: 0_u8,
6226        target_component: 0_u8,
6227        landed_state: MavLandedState::DEFAULT,
6228        angular_velocity_z: 0.0_f32,
6229    };
6230    #[cfg(feature = "arbitrary")]
6231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6232        use arbitrary::{Arbitrary, Unstructured};
6233        let mut buf = [0u8; 1024];
6234        rng.fill_bytes(&mut buf);
6235        let mut unstructured = Unstructured::new(&buf);
6236        Self::arbitrary(&mut unstructured).unwrap_or_default()
6237    }
6238}
6239impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6240    fn default() -> Self {
6241        Self::DEFAULT.clone()
6242    }
6243}
6244impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6245    type Message = MavMessage;
6246    const ID: u32 = 286u32;
6247    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6248    const EXTRA_CRC: u8 = 210u8;
6249    const ENCODED_LEN: usize = 57usize;
6250    fn deser(
6251        _version: MavlinkVersion,
6252        __input: &[u8],
6253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6254        let avail_len = __input.len();
6255        let mut payload_buf = [0; Self::ENCODED_LEN];
6256        let mut buf = if avail_len < Self::ENCODED_LEN {
6257            payload_buf[0..avail_len].copy_from_slice(__input);
6258            Bytes::new(&payload_buf)
6259        } else {
6260            Bytes::new(__input)
6261        };
6262        let mut __struct = Self::default();
6263        __struct.time_boot_us = buf.get_u64_le();
6264        for v in &mut __struct.q {
6265            let val = buf.get_f32_le();
6266            *v = val;
6267        }
6268        __struct.q_estimated_delay_us = buf.get_u32_le();
6269        __struct.vx = buf.get_f32_le();
6270        __struct.vy = buf.get_f32_le();
6271        __struct.vz = buf.get_f32_le();
6272        __struct.v_estimated_delay_us = buf.get_u32_le();
6273        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6274        let tmp = buf.get_u16_le();
6275        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6276            tmp & EstimatorStatusFlags::all().bits(),
6277        )
6278        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6279            flag_type: "EstimatorStatusFlags",
6280            value: tmp as u32,
6281        })?;
6282        __struct.target_system = buf.get_u8();
6283        __struct.target_component = buf.get_u8();
6284        let tmp = buf.get_u8();
6285        __struct.landed_state =
6286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6287                enum_type: "MavLandedState",
6288                value: tmp as u32,
6289            })?;
6290        __struct.angular_velocity_z = buf.get_f32_le();
6291        Ok(__struct)
6292    }
6293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6294        let mut __tmp = BytesMut::new(bytes);
6295        #[allow(clippy::absurd_extreme_comparisons)]
6296        #[allow(unused_comparisons)]
6297        if __tmp.remaining() < Self::ENCODED_LEN {
6298            panic!(
6299                "buffer is too small (need {} bytes, but got {})",
6300                Self::ENCODED_LEN,
6301                __tmp.remaining(),
6302            )
6303        }
6304        __tmp.put_u64_le(self.time_boot_us);
6305        for val in &self.q {
6306            __tmp.put_f32_le(*val);
6307        }
6308        __tmp.put_u32_le(self.q_estimated_delay_us);
6309        __tmp.put_f32_le(self.vx);
6310        __tmp.put_f32_le(self.vy);
6311        __tmp.put_f32_le(self.vz);
6312        __tmp.put_u32_le(self.v_estimated_delay_us);
6313        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6314        __tmp.put_u16_le(self.estimator_status.bits());
6315        __tmp.put_u8(self.target_system);
6316        __tmp.put_u8(self.target_component);
6317        __tmp.put_u8(self.landed_state as u8);
6318        if matches!(version, MavlinkVersion::V2) {
6319            __tmp.put_f32_le(self.angular_velocity_z);
6320            let len = __tmp.len();
6321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6322        } else {
6323            __tmp.len()
6324        }
6325    }
6326}
6327#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6328#[doc = ""]
6329#[doc = "ID: 148"]
6330#[derive(Debug, Clone, PartialEq)]
6331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6333#[cfg_attr(feature = "ts", derive(TS))]
6334#[cfg_attr(feature = "ts", ts(export))]
6335pub struct AUTOPILOT_VERSION_DATA {
6336    #[doc = "Bitmap of capabilities"]
6337    pub capabilities: MavProtocolCapability,
6338    #[doc = "UID if provided by hardware (see uid2)"]
6339    pub uid: u64,
6340    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6341    pub flight_sw_version: u32,
6342    #[doc = "Middleware version number"]
6343    pub middleware_sw_version: u32,
6344    #[doc = "Operating system version number"]
6345    pub os_sw_version: u32,
6346    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6347    pub board_version: u32,
6348    #[doc = "ID of the board vendor"]
6349    pub vendor_id: u16,
6350    #[doc = "ID of the product"]
6351    pub product_id: u16,
6352    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6354    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6355    pub flight_custom_version: [u8; 8],
6356    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6357    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6358    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6359    pub middleware_custom_version: [u8; 8],
6360    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6363    pub os_custom_version: [u8; 8],
6364    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6368    pub uid2: [u8; 18],
6369}
6370impl AUTOPILOT_VERSION_DATA {
6371    pub const ENCODED_LEN: usize = 78usize;
6372    pub const DEFAULT: Self = Self {
6373        capabilities: MavProtocolCapability::DEFAULT,
6374        uid: 0_u64,
6375        flight_sw_version: 0_u32,
6376        middleware_sw_version: 0_u32,
6377        os_sw_version: 0_u32,
6378        board_version: 0_u32,
6379        vendor_id: 0_u16,
6380        product_id: 0_u16,
6381        flight_custom_version: [0_u8; 8usize],
6382        middleware_custom_version: [0_u8; 8usize],
6383        os_custom_version: [0_u8; 8usize],
6384        uid2: [0_u8; 18usize],
6385    };
6386    #[cfg(feature = "arbitrary")]
6387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6388        use arbitrary::{Arbitrary, Unstructured};
6389        let mut buf = [0u8; 1024];
6390        rng.fill_bytes(&mut buf);
6391        let mut unstructured = Unstructured::new(&buf);
6392        Self::arbitrary(&mut unstructured).unwrap_or_default()
6393    }
6394}
6395impl Default for AUTOPILOT_VERSION_DATA {
6396    fn default() -> Self {
6397        Self::DEFAULT.clone()
6398    }
6399}
6400impl MessageData for AUTOPILOT_VERSION_DATA {
6401    type Message = MavMessage;
6402    const ID: u32 = 148u32;
6403    const NAME: &'static str = "AUTOPILOT_VERSION";
6404    const EXTRA_CRC: u8 = 178u8;
6405    const ENCODED_LEN: usize = 78usize;
6406    fn deser(
6407        _version: MavlinkVersion,
6408        __input: &[u8],
6409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6410        let avail_len = __input.len();
6411        let mut payload_buf = [0; Self::ENCODED_LEN];
6412        let mut buf = if avail_len < Self::ENCODED_LEN {
6413            payload_buf[0..avail_len].copy_from_slice(__input);
6414            Bytes::new(&payload_buf)
6415        } else {
6416            Bytes::new(__input)
6417        };
6418        let mut __struct = Self::default();
6419        let tmp = buf.get_u64_le();
6420        __struct.capabilities = MavProtocolCapability::from_bits(
6421            tmp & MavProtocolCapability::all().bits(),
6422        )
6423        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6424            flag_type: "MavProtocolCapability",
6425            value: tmp as u32,
6426        })?;
6427        __struct.uid = buf.get_u64_le();
6428        __struct.flight_sw_version = buf.get_u32_le();
6429        __struct.middleware_sw_version = buf.get_u32_le();
6430        __struct.os_sw_version = buf.get_u32_le();
6431        __struct.board_version = buf.get_u32_le();
6432        __struct.vendor_id = buf.get_u16_le();
6433        __struct.product_id = buf.get_u16_le();
6434        for v in &mut __struct.flight_custom_version {
6435            let val = buf.get_u8();
6436            *v = val;
6437        }
6438        for v in &mut __struct.middleware_custom_version {
6439            let val = buf.get_u8();
6440            *v = val;
6441        }
6442        for v in &mut __struct.os_custom_version {
6443            let val = buf.get_u8();
6444            *v = val;
6445        }
6446        for v in &mut __struct.uid2 {
6447            let val = buf.get_u8();
6448            *v = val;
6449        }
6450        Ok(__struct)
6451    }
6452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6453        let mut __tmp = BytesMut::new(bytes);
6454        #[allow(clippy::absurd_extreme_comparisons)]
6455        #[allow(unused_comparisons)]
6456        if __tmp.remaining() < Self::ENCODED_LEN {
6457            panic!(
6458                "buffer is too small (need {} bytes, but got {})",
6459                Self::ENCODED_LEN,
6460                __tmp.remaining(),
6461            )
6462        }
6463        __tmp.put_u64_le(self.capabilities.bits());
6464        __tmp.put_u64_le(self.uid);
6465        __tmp.put_u32_le(self.flight_sw_version);
6466        __tmp.put_u32_le(self.middleware_sw_version);
6467        __tmp.put_u32_le(self.os_sw_version);
6468        __tmp.put_u32_le(self.board_version);
6469        __tmp.put_u16_le(self.vendor_id);
6470        __tmp.put_u16_le(self.product_id);
6471        for val in &self.flight_custom_version {
6472            __tmp.put_u8(*val);
6473        }
6474        for val in &self.middleware_custom_version {
6475            __tmp.put_u8(*val);
6476        }
6477        for val in &self.os_custom_version {
6478            __tmp.put_u8(*val);
6479        }
6480        if matches!(version, MavlinkVersion::V2) {
6481            for val in &self.uid2 {
6482                __tmp.put_u8(*val);
6483            }
6484            let len = __tmp.len();
6485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6486        } else {
6487            __tmp.len()
6488        }
6489    }
6490}
6491#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6492#[doc = ""]
6493#[doc = "ID: 435"]
6494#[derive(Debug, Clone, PartialEq)]
6495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6497#[cfg_attr(feature = "ts", derive(TS))]
6498#[cfg_attr(feature = "ts", ts(export))]
6499pub struct AVAILABLE_MODES_DATA {
6500    #[doc = "A bitfield for use for autopilot-specific flags"]
6501    pub custom_mode: u32,
6502    #[doc = "Mode properties."]
6503    pub properties: MavModeProperty,
6504    #[doc = "The total number of available modes for the current vehicle type."]
6505    pub number_modes: u8,
6506    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6507    pub mode_index: u8,
6508    #[doc = "Standard mode."]
6509    pub standard_mode: MavStandardMode,
6510    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6513    pub mode_name: [u8; 35],
6514}
6515impl AVAILABLE_MODES_DATA {
6516    pub const ENCODED_LEN: usize = 46usize;
6517    pub const DEFAULT: Self = Self {
6518        custom_mode: 0_u32,
6519        properties: MavModeProperty::DEFAULT,
6520        number_modes: 0_u8,
6521        mode_index: 0_u8,
6522        standard_mode: MavStandardMode::DEFAULT,
6523        mode_name: [0_u8; 35usize],
6524    };
6525    #[cfg(feature = "arbitrary")]
6526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6527        use arbitrary::{Arbitrary, Unstructured};
6528        let mut buf = [0u8; 1024];
6529        rng.fill_bytes(&mut buf);
6530        let mut unstructured = Unstructured::new(&buf);
6531        Self::arbitrary(&mut unstructured).unwrap_or_default()
6532    }
6533}
6534impl Default for AVAILABLE_MODES_DATA {
6535    fn default() -> Self {
6536        Self::DEFAULT.clone()
6537    }
6538}
6539impl MessageData for AVAILABLE_MODES_DATA {
6540    type Message = MavMessage;
6541    const ID: u32 = 435u32;
6542    const NAME: &'static str = "AVAILABLE_MODES";
6543    const EXTRA_CRC: u8 = 134u8;
6544    const ENCODED_LEN: usize = 46usize;
6545    fn deser(
6546        _version: MavlinkVersion,
6547        __input: &[u8],
6548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6549        let avail_len = __input.len();
6550        let mut payload_buf = [0; Self::ENCODED_LEN];
6551        let mut buf = if avail_len < Self::ENCODED_LEN {
6552            payload_buf[0..avail_len].copy_from_slice(__input);
6553            Bytes::new(&payload_buf)
6554        } else {
6555            Bytes::new(__input)
6556        };
6557        let mut __struct = Self::default();
6558        __struct.custom_mode = buf.get_u32_le();
6559        let tmp = buf.get_u32_le();
6560        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6561            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6562                flag_type: "MavModeProperty",
6563                value: tmp as u32,
6564            })?;
6565        __struct.number_modes = buf.get_u8();
6566        __struct.mode_index = buf.get_u8();
6567        let tmp = buf.get_u8();
6568        __struct.standard_mode =
6569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6570                enum_type: "MavStandardMode",
6571                value: tmp as u32,
6572            })?;
6573        for v in &mut __struct.mode_name {
6574            let val = buf.get_u8();
6575            *v = val;
6576        }
6577        Ok(__struct)
6578    }
6579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6580        let mut __tmp = BytesMut::new(bytes);
6581        #[allow(clippy::absurd_extreme_comparisons)]
6582        #[allow(unused_comparisons)]
6583        if __tmp.remaining() < Self::ENCODED_LEN {
6584            panic!(
6585                "buffer is too small (need {} bytes, but got {})",
6586                Self::ENCODED_LEN,
6587                __tmp.remaining(),
6588            )
6589        }
6590        __tmp.put_u32_le(self.custom_mode);
6591        __tmp.put_u32_le(self.properties.bits());
6592        __tmp.put_u8(self.number_modes);
6593        __tmp.put_u8(self.mode_index);
6594        __tmp.put_u8(self.standard_mode as u8);
6595        for val in &self.mode_name {
6596            __tmp.put_u8(*val);
6597        }
6598        if matches!(version, MavlinkVersion::V2) {
6599            let len = __tmp.len();
6600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6601        } else {
6602            __tmp.len()
6603        }
6604    }
6605}
6606#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6607#[doc = ""]
6608#[doc = "ID: 437"]
6609#[derive(Debug, Clone, PartialEq)]
6610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6612#[cfg_attr(feature = "ts", derive(TS))]
6613#[cfg_attr(feature = "ts", ts(export))]
6614pub struct AVAILABLE_MODES_MONITOR_DATA {
6615    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6616    pub seq: u8,
6617}
6618impl AVAILABLE_MODES_MONITOR_DATA {
6619    pub const ENCODED_LEN: usize = 1usize;
6620    pub const DEFAULT: Self = Self { seq: 0_u8 };
6621    #[cfg(feature = "arbitrary")]
6622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6623        use arbitrary::{Arbitrary, Unstructured};
6624        let mut buf = [0u8; 1024];
6625        rng.fill_bytes(&mut buf);
6626        let mut unstructured = Unstructured::new(&buf);
6627        Self::arbitrary(&mut unstructured).unwrap_or_default()
6628    }
6629}
6630impl Default for AVAILABLE_MODES_MONITOR_DATA {
6631    fn default() -> Self {
6632        Self::DEFAULT.clone()
6633    }
6634}
6635impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6636    type Message = MavMessage;
6637    const ID: u32 = 437u32;
6638    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6639    const EXTRA_CRC: u8 = 30u8;
6640    const ENCODED_LEN: usize = 1usize;
6641    fn deser(
6642        _version: MavlinkVersion,
6643        __input: &[u8],
6644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6645        let avail_len = __input.len();
6646        let mut payload_buf = [0; Self::ENCODED_LEN];
6647        let mut buf = if avail_len < Self::ENCODED_LEN {
6648            payload_buf[0..avail_len].copy_from_slice(__input);
6649            Bytes::new(&payload_buf)
6650        } else {
6651            Bytes::new(__input)
6652        };
6653        let mut __struct = Self::default();
6654        __struct.seq = buf.get_u8();
6655        Ok(__struct)
6656    }
6657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6658        let mut __tmp = BytesMut::new(bytes);
6659        #[allow(clippy::absurd_extreme_comparisons)]
6660        #[allow(unused_comparisons)]
6661        if __tmp.remaining() < Self::ENCODED_LEN {
6662            panic!(
6663                "buffer is too small (need {} bytes, but got {})",
6664                Self::ENCODED_LEN,
6665                __tmp.remaining(),
6666            )
6667        }
6668        __tmp.put_u8(self.seq);
6669        if matches!(version, MavlinkVersion::V2) {
6670            let len = __tmp.len();
6671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6672        } else {
6673            __tmp.len()
6674        }
6675    }
6676}
6677#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6678#[doc = ""]
6679#[doc = "ID: 372"]
6680#[derive(Debug, Clone, PartialEq)]
6681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6683#[cfg_attr(feature = "ts", derive(TS))]
6684#[cfg_attr(feature = "ts", ts(export))]
6685pub struct BATTERY_INFO_DATA {
6686    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6687    pub discharge_minimum_voltage: f32,
6688    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6689    pub charging_minimum_voltage: f32,
6690    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6691    pub resting_minimum_voltage: f32,
6692    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6693    pub charging_maximum_voltage: f32,
6694    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6695    pub charging_maximum_current: f32,
6696    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6697    pub nominal_voltage: f32,
6698    #[doc = "Maximum pack discharge current. 0: field not provided."]
6699    pub discharge_maximum_current: f32,
6700    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6701    pub discharge_maximum_burst_current: f32,
6702    #[doc = "Fully charged design capacity. 0: field not provided."]
6703    pub design_capacity: f32,
6704    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6705    pub full_charge_capacity: f32,
6706    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6707    pub cycle_count: u16,
6708    #[doc = "Battery weight. 0: field not provided."]
6709    pub weight: u16,
6710    #[doc = "Battery ID"]
6711    pub id: u8,
6712    #[doc = "Function of the battery."]
6713    pub battery_function: MavBatteryFunction,
6714    #[doc = "Type (chemistry) of the battery."]
6715    pub mavtype: MavBatteryType,
6716    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6717    pub state_of_health: u8,
6718    #[doc = "Number of battery cells in series. 0: field not provided."]
6719    pub cells_in_series: u8,
6720    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6723    pub manufacture_date: [u8; 9],
6724    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6725    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6726    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6727    pub serial_number: [u8; 32],
6728    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6730    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6731    pub name: [u8; 50],
6732}
6733impl BATTERY_INFO_DATA {
6734    pub const ENCODED_LEN: usize = 140usize;
6735    pub const DEFAULT: Self = Self {
6736        discharge_minimum_voltage: 0.0_f32,
6737        charging_minimum_voltage: 0.0_f32,
6738        resting_minimum_voltage: 0.0_f32,
6739        charging_maximum_voltage: 0.0_f32,
6740        charging_maximum_current: 0.0_f32,
6741        nominal_voltage: 0.0_f32,
6742        discharge_maximum_current: 0.0_f32,
6743        discharge_maximum_burst_current: 0.0_f32,
6744        design_capacity: 0.0_f32,
6745        full_charge_capacity: 0.0_f32,
6746        cycle_count: 0_u16,
6747        weight: 0_u16,
6748        id: 0_u8,
6749        battery_function: MavBatteryFunction::DEFAULT,
6750        mavtype: MavBatteryType::DEFAULT,
6751        state_of_health: 0_u8,
6752        cells_in_series: 0_u8,
6753        manufacture_date: [0_u8; 9usize],
6754        serial_number: [0_u8; 32usize],
6755        name: [0_u8; 50usize],
6756    };
6757    #[cfg(feature = "arbitrary")]
6758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6759        use arbitrary::{Arbitrary, Unstructured};
6760        let mut buf = [0u8; 1024];
6761        rng.fill_bytes(&mut buf);
6762        let mut unstructured = Unstructured::new(&buf);
6763        Self::arbitrary(&mut unstructured).unwrap_or_default()
6764    }
6765}
6766impl Default for BATTERY_INFO_DATA {
6767    fn default() -> Self {
6768        Self::DEFAULT.clone()
6769    }
6770}
6771impl MessageData for BATTERY_INFO_DATA {
6772    type Message = MavMessage;
6773    const ID: u32 = 372u32;
6774    const NAME: &'static str = "BATTERY_INFO";
6775    const EXTRA_CRC: u8 = 26u8;
6776    const ENCODED_LEN: usize = 140usize;
6777    fn deser(
6778        _version: MavlinkVersion,
6779        __input: &[u8],
6780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6781        let avail_len = __input.len();
6782        let mut payload_buf = [0; Self::ENCODED_LEN];
6783        let mut buf = if avail_len < Self::ENCODED_LEN {
6784            payload_buf[0..avail_len].copy_from_slice(__input);
6785            Bytes::new(&payload_buf)
6786        } else {
6787            Bytes::new(__input)
6788        };
6789        let mut __struct = Self::default();
6790        __struct.discharge_minimum_voltage = buf.get_f32_le();
6791        __struct.charging_minimum_voltage = buf.get_f32_le();
6792        __struct.resting_minimum_voltage = buf.get_f32_le();
6793        __struct.charging_maximum_voltage = buf.get_f32_le();
6794        __struct.charging_maximum_current = buf.get_f32_le();
6795        __struct.nominal_voltage = buf.get_f32_le();
6796        __struct.discharge_maximum_current = buf.get_f32_le();
6797        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6798        __struct.design_capacity = buf.get_f32_le();
6799        __struct.full_charge_capacity = buf.get_f32_le();
6800        __struct.cycle_count = buf.get_u16_le();
6801        __struct.weight = buf.get_u16_le();
6802        __struct.id = buf.get_u8();
6803        let tmp = buf.get_u8();
6804        __struct.battery_function =
6805            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6806                enum_type: "MavBatteryFunction",
6807                value: tmp as u32,
6808            })?;
6809        let tmp = buf.get_u8();
6810        __struct.mavtype =
6811            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6812                enum_type: "MavBatteryType",
6813                value: tmp as u32,
6814            })?;
6815        __struct.state_of_health = buf.get_u8();
6816        __struct.cells_in_series = buf.get_u8();
6817        for v in &mut __struct.manufacture_date {
6818            let val = buf.get_u8();
6819            *v = val;
6820        }
6821        for v in &mut __struct.serial_number {
6822            let val = buf.get_u8();
6823            *v = val;
6824        }
6825        for v in &mut __struct.name {
6826            let val = buf.get_u8();
6827            *v = val;
6828        }
6829        Ok(__struct)
6830    }
6831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6832        let mut __tmp = BytesMut::new(bytes);
6833        #[allow(clippy::absurd_extreme_comparisons)]
6834        #[allow(unused_comparisons)]
6835        if __tmp.remaining() < Self::ENCODED_LEN {
6836            panic!(
6837                "buffer is too small (need {} bytes, but got {})",
6838                Self::ENCODED_LEN,
6839                __tmp.remaining(),
6840            )
6841        }
6842        __tmp.put_f32_le(self.discharge_minimum_voltage);
6843        __tmp.put_f32_le(self.charging_minimum_voltage);
6844        __tmp.put_f32_le(self.resting_minimum_voltage);
6845        __tmp.put_f32_le(self.charging_maximum_voltage);
6846        __tmp.put_f32_le(self.charging_maximum_current);
6847        __tmp.put_f32_le(self.nominal_voltage);
6848        __tmp.put_f32_le(self.discharge_maximum_current);
6849        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6850        __tmp.put_f32_le(self.design_capacity);
6851        __tmp.put_f32_le(self.full_charge_capacity);
6852        __tmp.put_u16_le(self.cycle_count);
6853        __tmp.put_u16_le(self.weight);
6854        __tmp.put_u8(self.id);
6855        __tmp.put_u8(self.battery_function as u8);
6856        __tmp.put_u8(self.mavtype as u8);
6857        __tmp.put_u8(self.state_of_health);
6858        __tmp.put_u8(self.cells_in_series);
6859        for val in &self.manufacture_date {
6860            __tmp.put_u8(*val);
6861        }
6862        for val in &self.serial_number {
6863            __tmp.put_u8(*val);
6864        }
6865        for val in &self.name {
6866            __tmp.put_u8(*val);
6867        }
6868        if matches!(version, MavlinkVersion::V2) {
6869            let len = __tmp.len();
6870            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6871        } else {
6872            __tmp.len()
6873        }
6874    }
6875}
6876#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6877#[doc = ""]
6878#[doc = "ID: 147"]
6879#[derive(Debug, Clone, PartialEq)]
6880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6882#[cfg_attr(feature = "ts", derive(TS))]
6883#[cfg_attr(feature = "ts", ts(export))]
6884pub struct BATTERY_STATUS_DATA {
6885    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6886    pub current_consumed: i32,
6887    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6888    pub energy_consumed: i32,
6889    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6890    pub temperature: i16,
6891    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6893    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6894    pub voltages: [u16; 10],
6895    #[doc = "Battery current, -1: autopilot does not measure the current"]
6896    pub current_battery: i16,
6897    #[doc = "Battery ID"]
6898    pub id: u8,
6899    #[doc = "Function of the battery"]
6900    pub battery_function: MavBatteryFunction,
6901    #[doc = "Type (chemistry) of the battery"]
6902    pub mavtype: MavBatteryType,
6903    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6904    pub battery_remaining: i8,
6905    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6906    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6907    pub time_remaining: i32,
6908    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6909    #[cfg_attr(feature = "serde", serde(default))]
6910    pub charge_state: MavBatteryChargeState,
6911    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6912    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6914    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6915    pub voltages_ext: [u16; 4],
6916    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6917    #[cfg_attr(feature = "serde", serde(default))]
6918    pub mode: MavBatteryMode,
6919    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6920    #[cfg_attr(feature = "serde", serde(default))]
6921    pub fault_bitmask: MavBatteryFault,
6922}
6923impl BATTERY_STATUS_DATA {
6924    pub const ENCODED_LEN: usize = 54usize;
6925    pub const DEFAULT: Self = Self {
6926        current_consumed: 0_i32,
6927        energy_consumed: 0_i32,
6928        temperature: 0_i16,
6929        voltages: [0_u16; 10usize],
6930        current_battery: 0_i16,
6931        id: 0_u8,
6932        battery_function: MavBatteryFunction::DEFAULT,
6933        mavtype: MavBatteryType::DEFAULT,
6934        battery_remaining: 0_i8,
6935        time_remaining: 0_i32,
6936        charge_state: MavBatteryChargeState::DEFAULT,
6937        voltages_ext: [0_u16; 4usize],
6938        mode: MavBatteryMode::DEFAULT,
6939        fault_bitmask: MavBatteryFault::DEFAULT,
6940    };
6941    #[cfg(feature = "arbitrary")]
6942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6943        use arbitrary::{Arbitrary, Unstructured};
6944        let mut buf = [0u8; 1024];
6945        rng.fill_bytes(&mut buf);
6946        let mut unstructured = Unstructured::new(&buf);
6947        Self::arbitrary(&mut unstructured).unwrap_or_default()
6948    }
6949}
6950impl Default for BATTERY_STATUS_DATA {
6951    fn default() -> Self {
6952        Self::DEFAULT.clone()
6953    }
6954}
6955impl MessageData for BATTERY_STATUS_DATA {
6956    type Message = MavMessage;
6957    const ID: u32 = 147u32;
6958    const NAME: &'static str = "BATTERY_STATUS";
6959    const EXTRA_CRC: u8 = 154u8;
6960    const ENCODED_LEN: usize = 54usize;
6961    fn deser(
6962        _version: MavlinkVersion,
6963        __input: &[u8],
6964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6965        let avail_len = __input.len();
6966        let mut payload_buf = [0; Self::ENCODED_LEN];
6967        let mut buf = if avail_len < Self::ENCODED_LEN {
6968            payload_buf[0..avail_len].copy_from_slice(__input);
6969            Bytes::new(&payload_buf)
6970        } else {
6971            Bytes::new(__input)
6972        };
6973        let mut __struct = Self::default();
6974        __struct.current_consumed = buf.get_i32_le();
6975        __struct.energy_consumed = buf.get_i32_le();
6976        __struct.temperature = buf.get_i16_le();
6977        for v in &mut __struct.voltages {
6978            let val = buf.get_u16_le();
6979            *v = val;
6980        }
6981        __struct.current_battery = buf.get_i16_le();
6982        __struct.id = buf.get_u8();
6983        let tmp = buf.get_u8();
6984        __struct.battery_function =
6985            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6986                enum_type: "MavBatteryFunction",
6987                value: tmp as u32,
6988            })?;
6989        let tmp = buf.get_u8();
6990        __struct.mavtype =
6991            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6992                enum_type: "MavBatteryType",
6993                value: tmp as u32,
6994            })?;
6995        __struct.battery_remaining = buf.get_i8();
6996        __struct.time_remaining = buf.get_i32_le();
6997        let tmp = buf.get_u8();
6998        __struct.charge_state =
6999            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7000                enum_type: "MavBatteryChargeState",
7001                value: tmp as u32,
7002            })?;
7003        for v in &mut __struct.voltages_ext {
7004            let val = buf.get_u16_le();
7005            *v = val;
7006        }
7007        let tmp = buf.get_u8();
7008        __struct.mode =
7009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7010                enum_type: "MavBatteryMode",
7011                value: tmp as u32,
7012            })?;
7013        let tmp = buf.get_u32_le();
7014        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7015            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7016                flag_type: "MavBatteryFault",
7017                value: tmp as u32,
7018            })?;
7019        Ok(__struct)
7020    }
7021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7022        let mut __tmp = BytesMut::new(bytes);
7023        #[allow(clippy::absurd_extreme_comparisons)]
7024        #[allow(unused_comparisons)]
7025        if __tmp.remaining() < Self::ENCODED_LEN {
7026            panic!(
7027                "buffer is too small (need {} bytes, but got {})",
7028                Self::ENCODED_LEN,
7029                __tmp.remaining(),
7030            )
7031        }
7032        __tmp.put_i32_le(self.current_consumed);
7033        __tmp.put_i32_le(self.energy_consumed);
7034        __tmp.put_i16_le(self.temperature);
7035        for val in &self.voltages {
7036            __tmp.put_u16_le(*val);
7037        }
7038        __tmp.put_i16_le(self.current_battery);
7039        __tmp.put_u8(self.id);
7040        __tmp.put_u8(self.battery_function as u8);
7041        __tmp.put_u8(self.mavtype as u8);
7042        __tmp.put_i8(self.battery_remaining);
7043        if matches!(version, MavlinkVersion::V2) {
7044            __tmp.put_i32_le(self.time_remaining);
7045            __tmp.put_u8(self.charge_state as u8);
7046            for val in &self.voltages_ext {
7047                __tmp.put_u16_le(*val);
7048            }
7049            __tmp.put_u8(self.mode as u8);
7050            __tmp.put_u32_le(self.fault_bitmask.bits());
7051            let len = __tmp.len();
7052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7053        } else {
7054            __tmp.len()
7055        }
7056    }
7057}
7058#[doc = "Report button state change."]
7059#[doc = ""]
7060#[doc = "ID: 257"]
7061#[derive(Debug, Clone, PartialEq)]
7062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7064#[cfg_attr(feature = "ts", derive(TS))]
7065#[cfg_attr(feature = "ts", ts(export))]
7066pub struct BUTTON_CHANGE_DATA {
7067    #[doc = "Timestamp (time since system boot)."]
7068    pub time_boot_ms: u32,
7069    #[doc = "Time of last change of button state."]
7070    pub last_change_ms: u32,
7071    #[doc = "Bitmap for state of buttons."]
7072    pub state: u8,
7073}
7074impl BUTTON_CHANGE_DATA {
7075    pub const ENCODED_LEN: usize = 9usize;
7076    pub const DEFAULT: Self = Self {
7077        time_boot_ms: 0_u32,
7078        last_change_ms: 0_u32,
7079        state: 0_u8,
7080    };
7081    #[cfg(feature = "arbitrary")]
7082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7083        use arbitrary::{Arbitrary, Unstructured};
7084        let mut buf = [0u8; 1024];
7085        rng.fill_bytes(&mut buf);
7086        let mut unstructured = Unstructured::new(&buf);
7087        Self::arbitrary(&mut unstructured).unwrap_or_default()
7088    }
7089}
7090impl Default for BUTTON_CHANGE_DATA {
7091    fn default() -> Self {
7092        Self::DEFAULT.clone()
7093    }
7094}
7095impl MessageData for BUTTON_CHANGE_DATA {
7096    type Message = MavMessage;
7097    const ID: u32 = 257u32;
7098    const NAME: &'static str = "BUTTON_CHANGE";
7099    const EXTRA_CRC: u8 = 131u8;
7100    const ENCODED_LEN: usize = 9usize;
7101    fn deser(
7102        _version: MavlinkVersion,
7103        __input: &[u8],
7104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7105        let avail_len = __input.len();
7106        let mut payload_buf = [0; Self::ENCODED_LEN];
7107        let mut buf = if avail_len < Self::ENCODED_LEN {
7108            payload_buf[0..avail_len].copy_from_slice(__input);
7109            Bytes::new(&payload_buf)
7110        } else {
7111            Bytes::new(__input)
7112        };
7113        let mut __struct = Self::default();
7114        __struct.time_boot_ms = buf.get_u32_le();
7115        __struct.last_change_ms = buf.get_u32_le();
7116        __struct.state = buf.get_u8();
7117        Ok(__struct)
7118    }
7119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7120        let mut __tmp = BytesMut::new(bytes);
7121        #[allow(clippy::absurd_extreme_comparisons)]
7122        #[allow(unused_comparisons)]
7123        if __tmp.remaining() < Self::ENCODED_LEN {
7124            panic!(
7125                "buffer is too small (need {} bytes, but got {})",
7126                Self::ENCODED_LEN,
7127                __tmp.remaining(),
7128            )
7129        }
7130        __tmp.put_u32_le(self.time_boot_ms);
7131        __tmp.put_u32_le(self.last_change_ms);
7132        __tmp.put_u8(self.state);
7133        if matches!(version, MavlinkVersion::V2) {
7134            let len = __tmp.len();
7135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7136        } else {
7137            __tmp.len()
7138        }
7139    }
7140}
7141#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7142#[doc = ""]
7143#[doc = "ID: 262"]
7144#[derive(Debug, Clone, PartialEq)]
7145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7147#[cfg_attr(feature = "ts", derive(TS))]
7148#[cfg_attr(feature = "ts", ts(export))]
7149pub struct CAMERA_CAPTURE_STATUS_DATA {
7150    #[doc = "Timestamp (time since system boot)."]
7151    pub time_boot_ms: u32,
7152    #[doc = "Image capture interval"]
7153    pub image_interval: f32,
7154    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7155    pub recording_time_ms: u32,
7156    #[doc = "Available storage capacity."]
7157    pub available_capacity: f32,
7158    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7159    pub image_status: u8,
7160    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7161    pub video_status: u8,
7162    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7163    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7164    pub image_count: i32,
7165    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7166    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7167    pub camera_device_id: u8,
7168}
7169impl CAMERA_CAPTURE_STATUS_DATA {
7170    pub const ENCODED_LEN: usize = 23usize;
7171    pub const DEFAULT: Self = Self {
7172        time_boot_ms: 0_u32,
7173        image_interval: 0.0_f32,
7174        recording_time_ms: 0_u32,
7175        available_capacity: 0.0_f32,
7176        image_status: 0_u8,
7177        video_status: 0_u8,
7178        image_count: 0_i32,
7179        camera_device_id: 0_u8,
7180    };
7181    #[cfg(feature = "arbitrary")]
7182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7183        use arbitrary::{Arbitrary, Unstructured};
7184        let mut buf = [0u8; 1024];
7185        rng.fill_bytes(&mut buf);
7186        let mut unstructured = Unstructured::new(&buf);
7187        Self::arbitrary(&mut unstructured).unwrap_or_default()
7188    }
7189}
7190impl Default for CAMERA_CAPTURE_STATUS_DATA {
7191    fn default() -> Self {
7192        Self::DEFAULT.clone()
7193    }
7194}
7195impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7196    type Message = MavMessage;
7197    const ID: u32 = 262u32;
7198    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7199    const EXTRA_CRC: u8 = 12u8;
7200    const ENCODED_LEN: usize = 23usize;
7201    fn deser(
7202        _version: MavlinkVersion,
7203        __input: &[u8],
7204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7205        let avail_len = __input.len();
7206        let mut payload_buf = [0; Self::ENCODED_LEN];
7207        let mut buf = if avail_len < Self::ENCODED_LEN {
7208            payload_buf[0..avail_len].copy_from_slice(__input);
7209            Bytes::new(&payload_buf)
7210        } else {
7211            Bytes::new(__input)
7212        };
7213        let mut __struct = Self::default();
7214        __struct.time_boot_ms = buf.get_u32_le();
7215        __struct.image_interval = buf.get_f32_le();
7216        __struct.recording_time_ms = buf.get_u32_le();
7217        __struct.available_capacity = buf.get_f32_le();
7218        __struct.image_status = buf.get_u8();
7219        __struct.video_status = buf.get_u8();
7220        __struct.image_count = buf.get_i32_le();
7221        __struct.camera_device_id = buf.get_u8();
7222        Ok(__struct)
7223    }
7224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7225        let mut __tmp = BytesMut::new(bytes);
7226        #[allow(clippy::absurd_extreme_comparisons)]
7227        #[allow(unused_comparisons)]
7228        if __tmp.remaining() < Self::ENCODED_LEN {
7229            panic!(
7230                "buffer is too small (need {} bytes, but got {})",
7231                Self::ENCODED_LEN,
7232                __tmp.remaining(),
7233            )
7234        }
7235        __tmp.put_u32_le(self.time_boot_ms);
7236        __tmp.put_f32_le(self.image_interval);
7237        __tmp.put_u32_le(self.recording_time_ms);
7238        __tmp.put_f32_le(self.available_capacity);
7239        __tmp.put_u8(self.image_status);
7240        __tmp.put_u8(self.video_status);
7241        if matches!(version, MavlinkVersion::V2) {
7242            __tmp.put_i32_le(self.image_count);
7243            __tmp.put_u8(self.camera_device_id);
7244            let len = __tmp.len();
7245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7246        } else {
7247            __tmp.len()
7248        }
7249    }
7250}
7251#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7252#[doc = ""]
7253#[doc = "ID: 271"]
7254#[derive(Debug, Clone, PartialEq)]
7255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7257#[cfg_attr(feature = "ts", derive(TS))]
7258#[cfg_attr(feature = "ts", ts(export))]
7259pub struct CAMERA_FOV_STATUS_DATA {
7260    #[doc = "Timestamp (time since system boot)."]
7261    pub time_boot_ms: u32,
7262    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7263    pub lat_camera: i32,
7264    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7265    pub lon_camera: i32,
7266    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7267    pub alt_camera: i32,
7268    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7269    pub lat_image: i32,
7270    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7271    pub lon_image: i32,
7272    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7273    pub alt_image: i32,
7274    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7276    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7277    pub q: [f32; 4],
7278    #[doc = "Horizontal field of view (NaN if unknown)."]
7279    pub hfov: f32,
7280    #[doc = "Vertical field of view (NaN if unknown)."]
7281    pub vfov: f32,
7282    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7283    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7284    pub camera_device_id: u8,
7285}
7286impl CAMERA_FOV_STATUS_DATA {
7287    pub const ENCODED_LEN: usize = 53usize;
7288    pub const DEFAULT: Self = Self {
7289        time_boot_ms: 0_u32,
7290        lat_camera: 0_i32,
7291        lon_camera: 0_i32,
7292        alt_camera: 0_i32,
7293        lat_image: 0_i32,
7294        lon_image: 0_i32,
7295        alt_image: 0_i32,
7296        q: [0.0_f32; 4usize],
7297        hfov: 0.0_f32,
7298        vfov: 0.0_f32,
7299        camera_device_id: 0_u8,
7300    };
7301    #[cfg(feature = "arbitrary")]
7302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7303        use arbitrary::{Arbitrary, Unstructured};
7304        let mut buf = [0u8; 1024];
7305        rng.fill_bytes(&mut buf);
7306        let mut unstructured = Unstructured::new(&buf);
7307        Self::arbitrary(&mut unstructured).unwrap_or_default()
7308    }
7309}
7310impl Default for CAMERA_FOV_STATUS_DATA {
7311    fn default() -> Self {
7312        Self::DEFAULT.clone()
7313    }
7314}
7315impl MessageData for CAMERA_FOV_STATUS_DATA {
7316    type Message = MavMessage;
7317    const ID: u32 = 271u32;
7318    const NAME: &'static str = "CAMERA_FOV_STATUS";
7319    const EXTRA_CRC: u8 = 22u8;
7320    const ENCODED_LEN: usize = 53usize;
7321    fn deser(
7322        _version: MavlinkVersion,
7323        __input: &[u8],
7324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7325        let avail_len = __input.len();
7326        let mut payload_buf = [0; Self::ENCODED_LEN];
7327        let mut buf = if avail_len < Self::ENCODED_LEN {
7328            payload_buf[0..avail_len].copy_from_slice(__input);
7329            Bytes::new(&payload_buf)
7330        } else {
7331            Bytes::new(__input)
7332        };
7333        let mut __struct = Self::default();
7334        __struct.time_boot_ms = buf.get_u32_le();
7335        __struct.lat_camera = buf.get_i32_le();
7336        __struct.lon_camera = buf.get_i32_le();
7337        __struct.alt_camera = buf.get_i32_le();
7338        __struct.lat_image = buf.get_i32_le();
7339        __struct.lon_image = buf.get_i32_le();
7340        __struct.alt_image = buf.get_i32_le();
7341        for v in &mut __struct.q {
7342            let val = buf.get_f32_le();
7343            *v = val;
7344        }
7345        __struct.hfov = buf.get_f32_le();
7346        __struct.vfov = buf.get_f32_le();
7347        __struct.camera_device_id = buf.get_u8();
7348        Ok(__struct)
7349    }
7350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7351        let mut __tmp = BytesMut::new(bytes);
7352        #[allow(clippy::absurd_extreme_comparisons)]
7353        #[allow(unused_comparisons)]
7354        if __tmp.remaining() < Self::ENCODED_LEN {
7355            panic!(
7356                "buffer is too small (need {} bytes, but got {})",
7357                Self::ENCODED_LEN,
7358                __tmp.remaining(),
7359            )
7360        }
7361        __tmp.put_u32_le(self.time_boot_ms);
7362        __tmp.put_i32_le(self.lat_camera);
7363        __tmp.put_i32_le(self.lon_camera);
7364        __tmp.put_i32_le(self.alt_camera);
7365        __tmp.put_i32_le(self.lat_image);
7366        __tmp.put_i32_le(self.lon_image);
7367        __tmp.put_i32_le(self.alt_image);
7368        for val in &self.q {
7369            __tmp.put_f32_le(*val);
7370        }
7371        __tmp.put_f32_le(self.hfov);
7372        __tmp.put_f32_le(self.vfov);
7373        if matches!(version, MavlinkVersion::V2) {
7374            __tmp.put_u8(self.camera_device_id);
7375            let len = __tmp.len();
7376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7377        } else {
7378            __tmp.len()
7379        }
7380    }
7381}
7382#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7383#[doc = ""]
7384#[doc = "ID: 263"]
7385#[derive(Debug, Clone, PartialEq)]
7386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7388#[cfg_attr(feature = "ts", derive(TS))]
7389#[cfg_attr(feature = "ts", ts(export))]
7390pub struct CAMERA_IMAGE_CAPTURED_DATA {
7391    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7392    pub time_utc: u64,
7393    #[doc = "Timestamp (time since system boot)."]
7394    pub time_boot_ms: u32,
7395    #[doc = "Latitude where image was taken"]
7396    pub lat: i32,
7397    #[doc = "Longitude where capture was taken"]
7398    pub lon: i32,
7399    #[doc = "Altitude (MSL) where image was taken"]
7400    pub alt: i32,
7401    #[doc = "Altitude above ground"]
7402    pub relative_alt: i32,
7403    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7404    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7405    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7406    pub q: [f32; 4],
7407    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7408    pub image_index: i32,
7409    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7410    pub camera_id: u8,
7411    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7412    pub capture_result: i8,
7413    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7414    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7415    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7416    pub file_url: [u8; 205],
7417}
7418impl CAMERA_IMAGE_CAPTURED_DATA {
7419    pub const ENCODED_LEN: usize = 255usize;
7420    pub const DEFAULT: Self = Self {
7421        time_utc: 0_u64,
7422        time_boot_ms: 0_u32,
7423        lat: 0_i32,
7424        lon: 0_i32,
7425        alt: 0_i32,
7426        relative_alt: 0_i32,
7427        q: [0.0_f32; 4usize],
7428        image_index: 0_i32,
7429        camera_id: 0_u8,
7430        capture_result: 0_i8,
7431        file_url: [0_u8; 205usize],
7432    };
7433    #[cfg(feature = "arbitrary")]
7434    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7435        use arbitrary::{Arbitrary, Unstructured};
7436        let mut buf = [0u8; 1024];
7437        rng.fill_bytes(&mut buf);
7438        let mut unstructured = Unstructured::new(&buf);
7439        Self::arbitrary(&mut unstructured).unwrap_or_default()
7440    }
7441}
7442impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7443    fn default() -> Self {
7444        Self::DEFAULT.clone()
7445    }
7446}
7447impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7448    type Message = MavMessage;
7449    const ID: u32 = 263u32;
7450    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7451    const EXTRA_CRC: u8 = 133u8;
7452    const ENCODED_LEN: usize = 255usize;
7453    fn deser(
7454        _version: MavlinkVersion,
7455        __input: &[u8],
7456    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7457        let avail_len = __input.len();
7458        let mut payload_buf = [0; Self::ENCODED_LEN];
7459        let mut buf = if avail_len < Self::ENCODED_LEN {
7460            payload_buf[0..avail_len].copy_from_slice(__input);
7461            Bytes::new(&payload_buf)
7462        } else {
7463            Bytes::new(__input)
7464        };
7465        let mut __struct = Self::default();
7466        __struct.time_utc = buf.get_u64_le();
7467        __struct.time_boot_ms = buf.get_u32_le();
7468        __struct.lat = buf.get_i32_le();
7469        __struct.lon = buf.get_i32_le();
7470        __struct.alt = buf.get_i32_le();
7471        __struct.relative_alt = buf.get_i32_le();
7472        for v in &mut __struct.q {
7473            let val = buf.get_f32_le();
7474            *v = val;
7475        }
7476        __struct.image_index = buf.get_i32_le();
7477        __struct.camera_id = buf.get_u8();
7478        __struct.capture_result = buf.get_i8();
7479        for v in &mut __struct.file_url {
7480            let val = buf.get_u8();
7481            *v = val;
7482        }
7483        Ok(__struct)
7484    }
7485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7486        let mut __tmp = BytesMut::new(bytes);
7487        #[allow(clippy::absurd_extreme_comparisons)]
7488        #[allow(unused_comparisons)]
7489        if __tmp.remaining() < Self::ENCODED_LEN {
7490            panic!(
7491                "buffer is too small (need {} bytes, but got {})",
7492                Self::ENCODED_LEN,
7493                __tmp.remaining(),
7494            )
7495        }
7496        __tmp.put_u64_le(self.time_utc);
7497        __tmp.put_u32_le(self.time_boot_ms);
7498        __tmp.put_i32_le(self.lat);
7499        __tmp.put_i32_le(self.lon);
7500        __tmp.put_i32_le(self.alt);
7501        __tmp.put_i32_le(self.relative_alt);
7502        for val in &self.q {
7503            __tmp.put_f32_le(*val);
7504        }
7505        __tmp.put_i32_le(self.image_index);
7506        __tmp.put_u8(self.camera_id);
7507        __tmp.put_i8(self.capture_result);
7508        for val in &self.file_url {
7509            __tmp.put_u8(*val);
7510        }
7511        if matches!(version, MavlinkVersion::V2) {
7512            let len = __tmp.len();
7513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7514        } else {
7515            __tmp.len()
7516        }
7517    }
7518}
7519#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7520#[doc = ""]
7521#[doc = "ID: 259"]
7522#[derive(Debug, Clone, PartialEq)]
7523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7525#[cfg_attr(feature = "ts", derive(TS))]
7526#[cfg_attr(feature = "ts", ts(export))]
7527pub struct CAMERA_INFORMATION_DATA {
7528    #[doc = "Timestamp (time since system boot)."]
7529    pub time_boot_ms: u32,
7530    #[doc = "0xff). Use 0 if not known."]
7531    pub firmware_version: u32,
7532    #[doc = "Focal length. Use NaN if not known."]
7533    pub focal_length: f32,
7534    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7535    pub sensor_size_h: f32,
7536    #[doc = "Image sensor size vertical. Use NaN if not known."]
7537    pub sensor_size_v: f32,
7538    #[doc = "Bitmap of camera capability flags."]
7539    pub flags: CameraCapFlags,
7540    #[doc = "Horizontal image resolution. Use 0 if not known."]
7541    pub resolution_h: u16,
7542    #[doc = "Vertical image resolution. Use 0 if not known."]
7543    pub resolution_v: u16,
7544    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7545    pub cam_definition_version: u16,
7546    #[doc = "Name of the camera vendor"]
7547    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7548    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7549    pub vendor_name: [u8; 32],
7550    #[doc = "Name of the camera model"]
7551    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7552    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7553    pub model_name: [u8; 32],
7554    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7555    pub lens_id: u8,
7556    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7558    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7559    pub cam_definition_uri: [u8; 140],
7560    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7561    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7562    pub gimbal_device_id: u8,
7563    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7564    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7565    pub camera_device_id: u8,
7566}
7567impl CAMERA_INFORMATION_DATA {
7568    pub const ENCODED_LEN: usize = 237usize;
7569    pub const DEFAULT: Self = Self {
7570        time_boot_ms: 0_u32,
7571        firmware_version: 0_u32,
7572        focal_length: 0.0_f32,
7573        sensor_size_h: 0.0_f32,
7574        sensor_size_v: 0.0_f32,
7575        flags: CameraCapFlags::DEFAULT,
7576        resolution_h: 0_u16,
7577        resolution_v: 0_u16,
7578        cam_definition_version: 0_u16,
7579        vendor_name: [0_u8; 32usize],
7580        model_name: [0_u8; 32usize],
7581        lens_id: 0_u8,
7582        cam_definition_uri: [0_u8; 140usize],
7583        gimbal_device_id: 0_u8,
7584        camera_device_id: 0_u8,
7585    };
7586    #[cfg(feature = "arbitrary")]
7587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7588        use arbitrary::{Arbitrary, Unstructured};
7589        let mut buf = [0u8; 1024];
7590        rng.fill_bytes(&mut buf);
7591        let mut unstructured = Unstructured::new(&buf);
7592        Self::arbitrary(&mut unstructured).unwrap_or_default()
7593    }
7594}
7595impl Default for CAMERA_INFORMATION_DATA {
7596    fn default() -> Self {
7597        Self::DEFAULT.clone()
7598    }
7599}
7600impl MessageData for CAMERA_INFORMATION_DATA {
7601    type Message = MavMessage;
7602    const ID: u32 = 259u32;
7603    const NAME: &'static str = "CAMERA_INFORMATION";
7604    const EXTRA_CRC: u8 = 92u8;
7605    const ENCODED_LEN: usize = 237usize;
7606    fn deser(
7607        _version: MavlinkVersion,
7608        __input: &[u8],
7609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7610        let avail_len = __input.len();
7611        let mut payload_buf = [0; Self::ENCODED_LEN];
7612        let mut buf = if avail_len < Self::ENCODED_LEN {
7613            payload_buf[0..avail_len].copy_from_slice(__input);
7614            Bytes::new(&payload_buf)
7615        } else {
7616            Bytes::new(__input)
7617        };
7618        let mut __struct = Self::default();
7619        __struct.time_boot_ms = buf.get_u32_le();
7620        __struct.firmware_version = buf.get_u32_le();
7621        __struct.focal_length = buf.get_f32_le();
7622        __struct.sensor_size_h = buf.get_f32_le();
7623        __struct.sensor_size_v = buf.get_f32_le();
7624        let tmp = buf.get_u32_le();
7625        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7626            ::mavlink_core::error::ParserError::InvalidFlag {
7627                flag_type: "CameraCapFlags",
7628                value: tmp as u32,
7629            },
7630        )?;
7631        __struct.resolution_h = buf.get_u16_le();
7632        __struct.resolution_v = buf.get_u16_le();
7633        __struct.cam_definition_version = buf.get_u16_le();
7634        for v in &mut __struct.vendor_name {
7635            let val = buf.get_u8();
7636            *v = val;
7637        }
7638        for v in &mut __struct.model_name {
7639            let val = buf.get_u8();
7640            *v = val;
7641        }
7642        __struct.lens_id = buf.get_u8();
7643        for v in &mut __struct.cam_definition_uri {
7644            let val = buf.get_u8();
7645            *v = val;
7646        }
7647        __struct.gimbal_device_id = buf.get_u8();
7648        __struct.camera_device_id = buf.get_u8();
7649        Ok(__struct)
7650    }
7651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7652        let mut __tmp = BytesMut::new(bytes);
7653        #[allow(clippy::absurd_extreme_comparisons)]
7654        #[allow(unused_comparisons)]
7655        if __tmp.remaining() < Self::ENCODED_LEN {
7656            panic!(
7657                "buffer is too small (need {} bytes, but got {})",
7658                Self::ENCODED_LEN,
7659                __tmp.remaining(),
7660            )
7661        }
7662        __tmp.put_u32_le(self.time_boot_ms);
7663        __tmp.put_u32_le(self.firmware_version);
7664        __tmp.put_f32_le(self.focal_length);
7665        __tmp.put_f32_le(self.sensor_size_h);
7666        __tmp.put_f32_le(self.sensor_size_v);
7667        __tmp.put_u32_le(self.flags.bits());
7668        __tmp.put_u16_le(self.resolution_h);
7669        __tmp.put_u16_le(self.resolution_v);
7670        __tmp.put_u16_le(self.cam_definition_version);
7671        for val in &self.vendor_name {
7672            __tmp.put_u8(*val);
7673        }
7674        for val in &self.model_name {
7675            __tmp.put_u8(*val);
7676        }
7677        __tmp.put_u8(self.lens_id);
7678        for val in &self.cam_definition_uri {
7679            __tmp.put_u8(*val);
7680        }
7681        if matches!(version, MavlinkVersion::V2) {
7682            __tmp.put_u8(self.gimbal_device_id);
7683            __tmp.put_u8(self.camera_device_id);
7684            let len = __tmp.len();
7685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7686        } else {
7687            __tmp.len()
7688        }
7689    }
7690}
7691#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7692#[doc = ""]
7693#[doc = "ID: 260"]
7694#[derive(Debug, Clone, PartialEq)]
7695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7697#[cfg_attr(feature = "ts", derive(TS))]
7698#[cfg_attr(feature = "ts", ts(export))]
7699pub struct CAMERA_SETTINGS_DATA {
7700    #[doc = "Timestamp (time since system boot)."]
7701    pub time_boot_ms: u32,
7702    #[doc = "Camera mode"]
7703    pub mode_id: CameraMode,
7704    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7706    pub zoomLevel: f32,
7707    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7709    pub focusLevel: f32,
7710    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7712    pub camera_device_id: u8,
7713}
7714impl CAMERA_SETTINGS_DATA {
7715    pub const ENCODED_LEN: usize = 14usize;
7716    pub const DEFAULT: Self = Self {
7717        time_boot_ms: 0_u32,
7718        mode_id: CameraMode::DEFAULT,
7719        zoomLevel: 0.0_f32,
7720        focusLevel: 0.0_f32,
7721        camera_device_id: 0_u8,
7722    };
7723    #[cfg(feature = "arbitrary")]
7724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7725        use arbitrary::{Arbitrary, Unstructured};
7726        let mut buf = [0u8; 1024];
7727        rng.fill_bytes(&mut buf);
7728        let mut unstructured = Unstructured::new(&buf);
7729        Self::arbitrary(&mut unstructured).unwrap_or_default()
7730    }
7731}
7732impl Default for CAMERA_SETTINGS_DATA {
7733    fn default() -> Self {
7734        Self::DEFAULT.clone()
7735    }
7736}
7737impl MessageData for CAMERA_SETTINGS_DATA {
7738    type Message = MavMessage;
7739    const ID: u32 = 260u32;
7740    const NAME: &'static str = "CAMERA_SETTINGS";
7741    const EXTRA_CRC: u8 = 146u8;
7742    const ENCODED_LEN: usize = 14usize;
7743    fn deser(
7744        _version: MavlinkVersion,
7745        __input: &[u8],
7746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7747        let avail_len = __input.len();
7748        let mut payload_buf = [0; Self::ENCODED_LEN];
7749        let mut buf = if avail_len < Self::ENCODED_LEN {
7750            payload_buf[0..avail_len].copy_from_slice(__input);
7751            Bytes::new(&payload_buf)
7752        } else {
7753            Bytes::new(__input)
7754        };
7755        let mut __struct = Self::default();
7756        __struct.time_boot_ms = buf.get_u32_le();
7757        let tmp = buf.get_u8();
7758        __struct.mode_id =
7759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7760                enum_type: "CameraMode",
7761                value: tmp as u32,
7762            })?;
7763        __struct.zoomLevel = buf.get_f32_le();
7764        __struct.focusLevel = buf.get_f32_le();
7765        __struct.camera_device_id = buf.get_u8();
7766        Ok(__struct)
7767    }
7768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7769        let mut __tmp = BytesMut::new(bytes);
7770        #[allow(clippy::absurd_extreme_comparisons)]
7771        #[allow(unused_comparisons)]
7772        if __tmp.remaining() < Self::ENCODED_LEN {
7773            panic!(
7774                "buffer is too small (need {} bytes, but got {})",
7775                Self::ENCODED_LEN,
7776                __tmp.remaining(),
7777            )
7778        }
7779        __tmp.put_u32_le(self.time_boot_ms);
7780        __tmp.put_u8(self.mode_id as u8);
7781        if matches!(version, MavlinkVersion::V2) {
7782            __tmp.put_f32_le(self.zoomLevel);
7783            __tmp.put_f32_le(self.focusLevel);
7784            __tmp.put_u8(self.camera_device_id);
7785            let len = __tmp.len();
7786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7787        } else {
7788            __tmp.len()
7789        }
7790    }
7791}
7792#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7793#[doc = ""]
7794#[doc = "ID: 277"]
7795#[derive(Debug, Clone, PartialEq)]
7796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7798#[cfg_attr(feature = "ts", derive(TS))]
7799#[cfg_attr(feature = "ts", ts(export))]
7800pub struct CAMERA_THERMAL_RANGE_DATA {
7801    #[doc = "Timestamp (time since system boot)."]
7802    pub time_boot_ms: u32,
7803    #[doc = "Temperature max."]
7804    pub max: f32,
7805    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7806    pub max_point_x: f32,
7807    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7808    pub max_point_y: f32,
7809    #[doc = "Temperature min."]
7810    pub min: f32,
7811    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7812    pub min_point_x: f32,
7813    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7814    pub min_point_y: f32,
7815    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7816    pub stream_id: u8,
7817    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7818    pub camera_device_id: u8,
7819}
7820impl CAMERA_THERMAL_RANGE_DATA {
7821    pub const ENCODED_LEN: usize = 30usize;
7822    pub const DEFAULT: Self = Self {
7823        time_boot_ms: 0_u32,
7824        max: 0.0_f32,
7825        max_point_x: 0.0_f32,
7826        max_point_y: 0.0_f32,
7827        min: 0.0_f32,
7828        min_point_x: 0.0_f32,
7829        min_point_y: 0.0_f32,
7830        stream_id: 0_u8,
7831        camera_device_id: 0_u8,
7832    };
7833    #[cfg(feature = "arbitrary")]
7834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7835        use arbitrary::{Arbitrary, Unstructured};
7836        let mut buf = [0u8; 1024];
7837        rng.fill_bytes(&mut buf);
7838        let mut unstructured = Unstructured::new(&buf);
7839        Self::arbitrary(&mut unstructured).unwrap_or_default()
7840    }
7841}
7842impl Default for CAMERA_THERMAL_RANGE_DATA {
7843    fn default() -> Self {
7844        Self::DEFAULT.clone()
7845    }
7846}
7847impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7848    type Message = MavMessage;
7849    const ID: u32 = 277u32;
7850    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7851    const EXTRA_CRC: u8 = 62u8;
7852    const ENCODED_LEN: usize = 30usize;
7853    fn deser(
7854        _version: MavlinkVersion,
7855        __input: &[u8],
7856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7857        let avail_len = __input.len();
7858        let mut payload_buf = [0; Self::ENCODED_LEN];
7859        let mut buf = if avail_len < Self::ENCODED_LEN {
7860            payload_buf[0..avail_len].copy_from_slice(__input);
7861            Bytes::new(&payload_buf)
7862        } else {
7863            Bytes::new(__input)
7864        };
7865        let mut __struct = Self::default();
7866        __struct.time_boot_ms = buf.get_u32_le();
7867        __struct.max = buf.get_f32_le();
7868        __struct.max_point_x = buf.get_f32_le();
7869        __struct.max_point_y = buf.get_f32_le();
7870        __struct.min = buf.get_f32_le();
7871        __struct.min_point_x = buf.get_f32_le();
7872        __struct.min_point_y = buf.get_f32_le();
7873        __struct.stream_id = buf.get_u8();
7874        __struct.camera_device_id = buf.get_u8();
7875        Ok(__struct)
7876    }
7877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7878        let mut __tmp = BytesMut::new(bytes);
7879        #[allow(clippy::absurd_extreme_comparisons)]
7880        #[allow(unused_comparisons)]
7881        if __tmp.remaining() < Self::ENCODED_LEN {
7882            panic!(
7883                "buffer is too small (need {} bytes, but got {})",
7884                Self::ENCODED_LEN,
7885                __tmp.remaining(),
7886            )
7887        }
7888        __tmp.put_u32_le(self.time_boot_ms);
7889        __tmp.put_f32_le(self.max);
7890        __tmp.put_f32_le(self.max_point_x);
7891        __tmp.put_f32_le(self.max_point_y);
7892        __tmp.put_f32_le(self.min);
7893        __tmp.put_f32_le(self.min_point_x);
7894        __tmp.put_f32_le(self.min_point_y);
7895        __tmp.put_u8(self.stream_id);
7896        __tmp.put_u8(self.camera_device_id);
7897        if matches!(version, MavlinkVersion::V2) {
7898            let len = __tmp.len();
7899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7900        } else {
7901            __tmp.len()
7902        }
7903    }
7904}
7905#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7906#[doc = ""]
7907#[doc = "ID: 276"]
7908#[derive(Debug, Clone, PartialEq)]
7909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7911#[cfg_attr(feature = "ts", derive(TS))]
7912#[cfg_attr(feature = "ts", ts(export))]
7913pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7914    #[doc = "Latitude of tracked object"]
7915    pub lat: i32,
7916    #[doc = "Longitude of tracked object"]
7917    pub lon: i32,
7918    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7919    pub alt: f32,
7920    #[doc = "Horizontal accuracy. NAN if unknown"]
7921    pub h_acc: f32,
7922    #[doc = "Vertical accuracy. NAN if unknown"]
7923    pub v_acc: f32,
7924    #[doc = "North velocity of tracked object. NAN if unknown"]
7925    pub vel_n: f32,
7926    #[doc = "East velocity of tracked object. NAN if unknown"]
7927    pub vel_e: f32,
7928    #[doc = "Down velocity of tracked object. NAN if unknown"]
7929    pub vel_d: f32,
7930    #[doc = "Velocity accuracy. NAN if unknown"]
7931    pub vel_acc: f32,
7932    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7933    pub dist: f32,
7934    #[doc = "Heading in radians, in NED. NAN if unknown"]
7935    pub hdg: f32,
7936    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7937    pub hdg_acc: f32,
7938    #[doc = "Current tracking status"]
7939    pub tracking_status: CameraTrackingStatusFlags,
7940    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7941    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7942    pub camera_device_id: u8,
7943}
7944impl CAMERA_TRACKING_GEO_STATUS_DATA {
7945    pub const ENCODED_LEN: usize = 50usize;
7946    pub const DEFAULT: Self = Self {
7947        lat: 0_i32,
7948        lon: 0_i32,
7949        alt: 0.0_f32,
7950        h_acc: 0.0_f32,
7951        v_acc: 0.0_f32,
7952        vel_n: 0.0_f32,
7953        vel_e: 0.0_f32,
7954        vel_d: 0.0_f32,
7955        vel_acc: 0.0_f32,
7956        dist: 0.0_f32,
7957        hdg: 0.0_f32,
7958        hdg_acc: 0.0_f32,
7959        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7960        camera_device_id: 0_u8,
7961    };
7962    #[cfg(feature = "arbitrary")]
7963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7964        use arbitrary::{Arbitrary, Unstructured};
7965        let mut buf = [0u8; 1024];
7966        rng.fill_bytes(&mut buf);
7967        let mut unstructured = Unstructured::new(&buf);
7968        Self::arbitrary(&mut unstructured).unwrap_or_default()
7969    }
7970}
7971impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7972    fn default() -> Self {
7973        Self::DEFAULT.clone()
7974    }
7975}
7976impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7977    type Message = MavMessage;
7978    const ID: u32 = 276u32;
7979    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7980    const EXTRA_CRC: u8 = 18u8;
7981    const ENCODED_LEN: usize = 50usize;
7982    fn deser(
7983        _version: MavlinkVersion,
7984        __input: &[u8],
7985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7986        let avail_len = __input.len();
7987        let mut payload_buf = [0; Self::ENCODED_LEN];
7988        let mut buf = if avail_len < Self::ENCODED_LEN {
7989            payload_buf[0..avail_len].copy_from_slice(__input);
7990            Bytes::new(&payload_buf)
7991        } else {
7992            Bytes::new(__input)
7993        };
7994        let mut __struct = Self::default();
7995        __struct.lat = buf.get_i32_le();
7996        __struct.lon = buf.get_i32_le();
7997        __struct.alt = buf.get_f32_le();
7998        __struct.h_acc = buf.get_f32_le();
7999        __struct.v_acc = buf.get_f32_le();
8000        __struct.vel_n = buf.get_f32_le();
8001        __struct.vel_e = buf.get_f32_le();
8002        __struct.vel_d = buf.get_f32_le();
8003        __struct.vel_acc = buf.get_f32_le();
8004        __struct.dist = buf.get_f32_le();
8005        __struct.hdg = buf.get_f32_le();
8006        __struct.hdg_acc = buf.get_f32_le();
8007        let tmp = buf.get_u8();
8008        __struct.tracking_status =
8009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8010                enum_type: "CameraTrackingStatusFlags",
8011                value: tmp as u32,
8012            })?;
8013        __struct.camera_device_id = buf.get_u8();
8014        Ok(__struct)
8015    }
8016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8017        let mut __tmp = BytesMut::new(bytes);
8018        #[allow(clippy::absurd_extreme_comparisons)]
8019        #[allow(unused_comparisons)]
8020        if __tmp.remaining() < Self::ENCODED_LEN {
8021            panic!(
8022                "buffer is too small (need {} bytes, but got {})",
8023                Self::ENCODED_LEN,
8024                __tmp.remaining(),
8025            )
8026        }
8027        __tmp.put_i32_le(self.lat);
8028        __tmp.put_i32_le(self.lon);
8029        __tmp.put_f32_le(self.alt);
8030        __tmp.put_f32_le(self.h_acc);
8031        __tmp.put_f32_le(self.v_acc);
8032        __tmp.put_f32_le(self.vel_n);
8033        __tmp.put_f32_le(self.vel_e);
8034        __tmp.put_f32_le(self.vel_d);
8035        __tmp.put_f32_le(self.vel_acc);
8036        __tmp.put_f32_le(self.dist);
8037        __tmp.put_f32_le(self.hdg);
8038        __tmp.put_f32_le(self.hdg_acc);
8039        __tmp.put_u8(self.tracking_status as u8);
8040        if matches!(version, MavlinkVersion::V2) {
8041            __tmp.put_u8(self.camera_device_id);
8042            let len = __tmp.len();
8043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8044        } else {
8045            __tmp.len()
8046        }
8047    }
8048}
8049#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8050#[doc = ""]
8051#[doc = "ID: 275"]
8052#[derive(Debug, Clone, PartialEq)]
8053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8055#[cfg_attr(feature = "ts", derive(TS))]
8056#[cfg_attr(feature = "ts", ts(export))]
8057pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8058    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8059    pub point_x: f32,
8060    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8061    pub point_y: f32,
8062    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8063    pub radius: f32,
8064    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8065    pub rec_top_x: f32,
8066    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8067    pub rec_top_y: f32,
8068    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8069    pub rec_bottom_x: f32,
8070    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8071    pub rec_bottom_y: f32,
8072    #[doc = "Current tracking status"]
8073    pub tracking_status: CameraTrackingStatusFlags,
8074    #[doc = "Current tracking mode"]
8075    pub tracking_mode: CameraTrackingMode,
8076    #[doc = "Defines location of target data"]
8077    pub target_data: CameraTrackingTargetData,
8078    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8080    pub camera_device_id: u8,
8081}
8082impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8083    pub const ENCODED_LEN: usize = 32usize;
8084    pub const DEFAULT: Self = Self {
8085        point_x: 0.0_f32,
8086        point_y: 0.0_f32,
8087        radius: 0.0_f32,
8088        rec_top_x: 0.0_f32,
8089        rec_top_y: 0.0_f32,
8090        rec_bottom_x: 0.0_f32,
8091        rec_bottom_y: 0.0_f32,
8092        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8093        tracking_mode: CameraTrackingMode::DEFAULT,
8094        target_data: CameraTrackingTargetData::DEFAULT,
8095        camera_device_id: 0_u8,
8096    };
8097    #[cfg(feature = "arbitrary")]
8098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8099        use arbitrary::{Arbitrary, Unstructured};
8100        let mut buf = [0u8; 1024];
8101        rng.fill_bytes(&mut buf);
8102        let mut unstructured = Unstructured::new(&buf);
8103        Self::arbitrary(&mut unstructured).unwrap_or_default()
8104    }
8105}
8106impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8107    fn default() -> Self {
8108        Self::DEFAULT.clone()
8109    }
8110}
8111impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8112    type Message = MavMessage;
8113    const ID: u32 = 275u32;
8114    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8115    const EXTRA_CRC: u8 = 126u8;
8116    const ENCODED_LEN: usize = 32usize;
8117    fn deser(
8118        _version: MavlinkVersion,
8119        __input: &[u8],
8120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8121        let avail_len = __input.len();
8122        let mut payload_buf = [0; Self::ENCODED_LEN];
8123        let mut buf = if avail_len < Self::ENCODED_LEN {
8124            payload_buf[0..avail_len].copy_from_slice(__input);
8125            Bytes::new(&payload_buf)
8126        } else {
8127            Bytes::new(__input)
8128        };
8129        let mut __struct = Self::default();
8130        __struct.point_x = buf.get_f32_le();
8131        __struct.point_y = buf.get_f32_le();
8132        __struct.radius = buf.get_f32_le();
8133        __struct.rec_top_x = buf.get_f32_le();
8134        __struct.rec_top_y = buf.get_f32_le();
8135        __struct.rec_bottom_x = buf.get_f32_le();
8136        __struct.rec_bottom_y = buf.get_f32_le();
8137        let tmp = buf.get_u8();
8138        __struct.tracking_status =
8139            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8140                enum_type: "CameraTrackingStatusFlags",
8141                value: tmp as u32,
8142            })?;
8143        let tmp = buf.get_u8();
8144        __struct.tracking_mode =
8145            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8146                enum_type: "CameraTrackingMode",
8147                value: tmp as u32,
8148            })?;
8149        let tmp = buf.get_u8();
8150        __struct.target_data =
8151            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8152                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8153                    flag_type: "CameraTrackingTargetData",
8154                    value: tmp as u32,
8155                })?;
8156        __struct.camera_device_id = buf.get_u8();
8157        Ok(__struct)
8158    }
8159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8160        let mut __tmp = BytesMut::new(bytes);
8161        #[allow(clippy::absurd_extreme_comparisons)]
8162        #[allow(unused_comparisons)]
8163        if __tmp.remaining() < Self::ENCODED_LEN {
8164            panic!(
8165                "buffer is too small (need {} bytes, but got {})",
8166                Self::ENCODED_LEN,
8167                __tmp.remaining(),
8168            )
8169        }
8170        __tmp.put_f32_le(self.point_x);
8171        __tmp.put_f32_le(self.point_y);
8172        __tmp.put_f32_le(self.radius);
8173        __tmp.put_f32_le(self.rec_top_x);
8174        __tmp.put_f32_le(self.rec_top_y);
8175        __tmp.put_f32_le(self.rec_bottom_x);
8176        __tmp.put_f32_le(self.rec_bottom_y);
8177        __tmp.put_u8(self.tracking_status as u8);
8178        __tmp.put_u8(self.tracking_mode as u8);
8179        __tmp.put_u8(self.target_data.bits());
8180        if matches!(version, MavlinkVersion::V2) {
8181            __tmp.put_u8(self.camera_device_id);
8182            let len = __tmp.len();
8183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8184        } else {
8185            __tmp.len()
8186        }
8187    }
8188}
8189#[doc = "Camera-IMU triggering and synchronisation message."]
8190#[doc = ""]
8191#[doc = "ID: 112"]
8192#[derive(Debug, Clone, PartialEq)]
8193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8195#[cfg_attr(feature = "ts", derive(TS))]
8196#[cfg_attr(feature = "ts", ts(export))]
8197pub struct CAMERA_TRIGGER_DATA {
8198    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8199    pub time_usec: u64,
8200    #[doc = "Image frame sequence"]
8201    pub seq: u32,
8202}
8203impl CAMERA_TRIGGER_DATA {
8204    pub const ENCODED_LEN: usize = 12usize;
8205    pub const DEFAULT: Self = Self {
8206        time_usec: 0_u64,
8207        seq: 0_u32,
8208    };
8209    #[cfg(feature = "arbitrary")]
8210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8211        use arbitrary::{Arbitrary, Unstructured};
8212        let mut buf = [0u8; 1024];
8213        rng.fill_bytes(&mut buf);
8214        let mut unstructured = Unstructured::new(&buf);
8215        Self::arbitrary(&mut unstructured).unwrap_or_default()
8216    }
8217}
8218impl Default for CAMERA_TRIGGER_DATA {
8219    fn default() -> Self {
8220        Self::DEFAULT.clone()
8221    }
8222}
8223impl MessageData for CAMERA_TRIGGER_DATA {
8224    type Message = MavMessage;
8225    const ID: u32 = 112u32;
8226    const NAME: &'static str = "CAMERA_TRIGGER";
8227    const EXTRA_CRC: u8 = 174u8;
8228    const ENCODED_LEN: usize = 12usize;
8229    fn deser(
8230        _version: MavlinkVersion,
8231        __input: &[u8],
8232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8233        let avail_len = __input.len();
8234        let mut payload_buf = [0; Self::ENCODED_LEN];
8235        let mut buf = if avail_len < Self::ENCODED_LEN {
8236            payload_buf[0..avail_len].copy_from_slice(__input);
8237            Bytes::new(&payload_buf)
8238        } else {
8239            Bytes::new(__input)
8240        };
8241        let mut __struct = Self::default();
8242        __struct.time_usec = buf.get_u64_le();
8243        __struct.seq = buf.get_u32_le();
8244        Ok(__struct)
8245    }
8246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8247        let mut __tmp = BytesMut::new(bytes);
8248        #[allow(clippy::absurd_extreme_comparisons)]
8249        #[allow(unused_comparisons)]
8250        if __tmp.remaining() < Self::ENCODED_LEN {
8251            panic!(
8252                "buffer is too small (need {} bytes, but got {})",
8253                Self::ENCODED_LEN,
8254                __tmp.remaining(),
8255            )
8256        }
8257        __tmp.put_u64_le(self.time_usec);
8258        __tmp.put_u32_le(self.seq);
8259        if matches!(version, MavlinkVersion::V2) {
8260            let len = __tmp.len();
8261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8262        } else {
8263            __tmp.len()
8264        }
8265    }
8266}
8267#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8268#[doc = ""]
8269#[doc = "ID: 387"]
8270#[derive(Debug, Clone, PartialEq)]
8271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8273#[cfg_attr(feature = "ts", derive(TS))]
8274#[cfg_attr(feature = "ts", ts(export))]
8275pub struct CANFD_FRAME_DATA {
8276    #[doc = "Frame ID"]
8277    pub id: u32,
8278    #[doc = "System ID."]
8279    pub target_system: u8,
8280    #[doc = "Component ID."]
8281    pub target_component: u8,
8282    #[doc = "bus number"]
8283    pub bus: u8,
8284    #[doc = "Frame length"]
8285    pub len: u8,
8286    #[doc = "Frame data"]
8287    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8288    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8289    pub data: [u8; 64],
8290}
8291impl CANFD_FRAME_DATA {
8292    pub const ENCODED_LEN: usize = 72usize;
8293    pub const DEFAULT: Self = Self {
8294        id: 0_u32,
8295        target_system: 0_u8,
8296        target_component: 0_u8,
8297        bus: 0_u8,
8298        len: 0_u8,
8299        data: [0_u8; 64usize],
8300    };
8301    #[cfg(feature = "arbitrary")]
8302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8303        use arbitrary::{Arbitrary, Unstructured};
8304        let mut buf = [0u8; 1024];
8305        rng.fill_bytes(&mut buf);
8306        let mut unstructured = Unstructured::new(&buf);
8307        Self::arbitrary(&mut unstructured).unwrap_or_default()
8308    }
8309}
8310impl Default for CANFD_FRAME_DATA {
8311    fn default() -> Self {
8312        Self::DEFAULT.clone()
8313    }
8314}
8315impl MessageData for CANFD_FRAME_DATA {
8316    type Message = MavMessage;
8317    const ID: u32 = 387u32;
8318    const NAME: &'static str = "CANFD_FRAME";
8319    const EXTRA_CRC: u8 = 4u8;
8320    const ENCODED_LEN: usize = 72usize;
8321    fn deser(
8322        _version: MavlinkVersion,
8323        __input: &[u8],
8324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8325        let avail_len = __input.len();
8326        let mut payload_buf = [0; Self::ENCODED_LEN];
8327        let mut buf = if avail_len < Self::ENCODED_LEN {
8328            payload_buf[0..avail_len].copy_from_slice(__input);
8329            Bytes::new(&payload_buf)
8330        } else {
8331            Bytes::new(__input)
8332        };
8333        let mut __struct = Self::default();
8334        __struct.id = buf.get_u32_le();
8335        __struct.target_system = buf.get_u8();
8336        __struct.target_component = buf.get_u8();
8337        __struct.bus = buf.get_u8();
8338        __struct.len = buf.get_u8();
8339        for v in &mut __struct.data {
8340            let val = buf.get_u8();
8341            *v = val;
8342        }
8343        Ok(__struct)
8344    }
8345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8346        let mut __tmp = BytesMut::new(bytes);
8347        #[allow(clippy::absurd_extreme_comparisons)]
8348        #[allow(unused_comparisons)]
8349        if __tmp.remaining() < Self::ENCODED_LEN {
8350            panic!(
8351                "buffer is too small (need {} bytes, but got {})",
8352                Self::ENCODED_LEN,
8353                __tmp.remaining(),
8354            )
8355        }
8356        __tmp.put_u32_le(self.id);
8357        __tmp.put_u8(self.target_system);
8358        __tmp.put_u8(self.target_component);
8359        __tmp.put_u8(self.bus);
8360        __tmp.put_u8(self.len);
8361        for val in &self.data {
8362            __tmp.put_u8(*val);
8363        }
8364        if matches!(version, MavlinkVersion::V2) {
8365            let len = __tmp.len();
8366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8367        } else {
8368            __tmp.len()
8369        }
8370    }
8371}
8372#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8373#[doc = ""]
8374#[doc = "ID: 388"]
8375#[derive(Debug, Clone, PartialEq)]
8376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8378#[cfg_attr(feature = "ts", derive(TS))]
8379#[cfg_attr(feature = "ts", ts(export))]
8380pub struct CAN_FILTER_MODIFY_DATA {
8381    #[doc = "filter IDs, length num_ids"]
8382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8384    pub ids: [u16; 16],
8385    #[doc = "System ID."]
8386    pub target_system: u8,
8387    #[doc = "Component ID."]
8388    pub target_component: u8,
8389    #[doc = "bus number"]
8390    pub bus: u8,
8391    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8392    pub operation: CanFilterOp,
8393    #[doc = "number of IDs in filter list"]
8394    pub num_ids: u8,
8395}
8396impl CAN_FILTER_MODIFY_DATA {
8397    pub const ENCODED_LEN: usize = 37usize;
8398    pub const DEFAULT: Self = Self {
8399        ids: [0_u16; 16usize],
8400        target_system: 0_u8,
8401        target_component: 0_u8,
8402        bus: 0_u8,
8403        operation: CanFilterOp::DEFAULT,
8404        num_ids: 0_u8,
8405    };
8406    #[cfg(feature = "arbitrary")]
8407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8408        use arbitrary::{Arbitrary, Unstructured};
8409        let mut buf = [0u8; 1024];
8410        rng.fill_bytes(&mut buf);
8411        let mut unstructured = Unstructured::new(&buf);
8412        Self::arbitrary(&mut unstructured).unwrap_or_default()
8413    }
8414}
8415impl Default for CAN_FILTER_MODIFY_DATA {
8416    fn default() -> Self {
8417        Self::DEFAULT.clone()
8418    }
8419}
8420impl MessageData for CAN_FILTER_MODIFY_DATA {
8421    type Message = MavMessage;
8422    const ID: u32 = 388u32;
8423    const NAME: &'static str = "CAN_FILTER_MODIFY";
8424    const EXTRA_CRC: u8 = 8u8;
8425    const ENCODED_LEN: usize = 37usize;
8426    fn deser(
8427        _version: MavlinkVersion,
8428        __input: &[u8],
8429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8430        let avail_len = __input.len();
8431        let mut payload_buf = [0; Self::ENCODED_LEN];
8432        let mut buf = if avail_len < Self::ENCODED_LEN {
8433            payload_buf[0..avail_len].copy_from_slice(__input);
8434            Bytes::new(&payload_buf)
8435        } else {
8436            Bytes::new(__input)
8437        };
8438        let mut __struct = Self::default();
8439        for v in &mut __struct.ids {
8440            let val = buf.get_u16_le();
8441            *v = val;
8442        }
8443        __struct.target_system = buf.get_u8();
8444        __struct.target_component = buf.get_u8();
8445        __struct.bus = buf.get_u8();
8446        let tmp = buf.get_u8();
8447        __struct.operation =
8448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8449                enum_type: "CanFilterOp",
8450                value: tmp as u32,
8451            })?;
8452        __struct.num_ids = buf.get_u8();
8453        Ok(__struct)
8454    }
8455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8456        let mut __tmp = BytesMut::new(bytes);
8457        #[allow(clippy::absurd_extreme_comparisons)]
8458        #[allow(unused_comparisons)]
8459        if __tmp.remaining() < Self::ENCODED_LEN {
8460            panic!(
8461                "buffer is too small (need {} bytes, but got {})",
8462                Self::ENCODED_LEN,
8463                __tmp.remaining(),
8464            )
8465        }
8466        for val in &self.ids {
8467            __tmp.put_u16_le(*val);
8468        }
8469        __tmp.put_u8(self.target_system);
8470        __tmp.put_u8(self.target_component);
8471        __tmp.put_u8(self.bus);
8472        __tmp.put_u8(self.operation as u8);
8473        __tmp.put_u8(self.num_ids);
8474        if matches!(version, MavlinkVersion::V2) {
8475            let len = __tmp.len();
8476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8477        } else {
8478            __tmp.len()
8479        }
8480    }
8481}
8482#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8483#[doc = ""]
8484#[doc = "ID: 386"]
8485#[derive(Debug, Clone, PartialEq)]
8486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8488#[cfg_attr(feature = "ts", derive(TS))]
8489#[cfg_attr(feature = "ts", ts(export))]
8490pub struct CAN_FRAME_DATA {
8491    #[doc = "Frame ID"]
8492    pub id: u32,
8493    #[doc = "System ID."]
8494    pub target_system: u8,
8495    #[doc = "Component ID."]
8496    pub target_component: u8,
8497    #[doc = "Bus number"]
8498    pub bus: u8,
8499    #[doc = "Frame length"]
8500    pub len: u8,
8501    #[doc = "Frame data"]
8502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8504    pub data: [u8; 8],
8505}
8506impl CAN_FRAME_DATA {
8507    pub const ENCODED_LEN: usize = 16usize;
8508    pub const DEFAULT: Self = Self {
8509        id: 0_u32,
8510        target_system: 0_u8,
8511        target_component: 0_u8,
8512        bus: 0_u8,
8513        len: 0_u8,
8514        data: [0_u8; 8usize],
8515    };
8516    #[cfg(feature = "arbitrary")]
8517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8518        use arbitrary::{Arbitrary, Unstructured};
8519        let mut buf = [0u8; 1024];
8520        rng.fill_bytes(&mut buf);
8521        let mut unstructured = Unstructured::new(&buf);
8522        Self::arbitrary(&mut unstructured).unwrap_or_default()
8523    }
8524}
8525impl Default for CAN_FRAME_DATA {
8526    fn default() -> Self {
8527        Self::DEFAULT.clone()
8528    }
8529}
8530impl MessageData for CAN_FRAME_DATA {
8531    type Message = MavMessage;
8532    const ID: u32 = 386u32;
8533    const NAME: &'static str = "CAN_FRAME";
8534    const EXTRA_CRC: u8 = 132u8;
8535    const ENCODED_LEN: usize = 16usize;
8536    fn deser(
8537        _version: MavlinkVersion,
8538        __input: &[u8],
8539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8540        let avail_len = __input.len();
8541        let mut payload_buf = [0; Self::ENCODED_LEN];
8542        let mut buf = if avail_len < Self::ENCODED_LEN {
8543            payload_buf[0..avail_len].copy_from_slice(__input);
8544            Bytes::new(&payload_buf)
8545        } else {
8546            Bytes::new(__input)
8547        };
8548        let mut __struct = Self::default();
8549        __struct.id = buf.get_u32_le();
8550        __struct.target_system = buf.get_u8();
8551        __struct.target_component = buf.get_u8();
8552        __struct.bus = buf.get_u8();
8553        __struct.len = buf.get_u8();
8554        for v in &mut __struct.data {
8555            let val = buf.get_u8();
8556            *v = val;
8557        }
8558        Ok(__struct)
8559    }
8560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8561        let mut __tmp = BytesMut::new(bytes);
8562        #[allow(clippy::absurd_extreme_comparisons)]
8563        #[allow(unused_comparisons)]
8564        if __tmp.remaining() < Self::ENCODED_LEN {
8565            panic!(
8566                "buffer is too small (need {} bytes, but got {})",
8567                Self::ENCODED_LEN,
8568                __tmp.remaining(),
8569            )
8570        }
8571        __tmp.put_u32_le(self.id);
8572        __tmp.put_u8(self.target_system);
8573        __tmp.put_u8(self.target_component);
8574        __tmp.put_u8(self.bus);
8575        __tmp.put_u8(self.len);
8576        for val in &self.data {
8577            __tmp.put_u8(*val);
8578        }
8579        if matches!(version, MavlinkVersion::V2) {
8580            let len = __tmp.len();
8581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8582        } else {
8583            __tmp.len()
8584        }
8585    }
8586}
8587#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8588#[doc = ""]
8589#[doc = "ID: 336"]
8590#[derive(Debug, Clone, PartialEq)]
8591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8593#[cfg_attr(feature = "ts", derive(TS))]
8594#[cfg_attr(feature = "ts", ts(export))]
8595pub struct CELLULAR_CONFIG_DATA {
8596    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8597    pub enable_lte: u8,
8598    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8599    pub enable_pin: u8,
8600    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8603    pub pin: [u8; 16],
8604    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8607    pub new_pin: [u8; 16],
8608    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8611    pub apn: [u8; 32],
8612    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8615    pub puk: [u8; 16],
8616    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8617    pub roaming: u8,
8618    #[doc = "Message acceptance response (sent back to GS)."]
8619    pub response: CellularConfigResponse,
8620}
8621impl CELLULAR_CONFIG_DATA {
8622    pub const ENCODED_LEN: usize = 84usize;
8623    pub const DEFAULT: Self = Self {
8624        enable_lte: 0_u8,
8625        enable_pin: 0_u8,
8626        pin: [0_u8; 16usize],
8627        new_pin: [0_u8; 16usize],
8628        apn: [0_u8; 32usize],
8629        puk: [0_u8; 16usize],
8630        roaming: 0_u8,
8631        response: CellularConfigResponse::DEFAULT,
8632    };
8633    #[cfg(feature = "arbitrary")]
8634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8635        use arbitrary::{Arbitrary, Unstructured};
8636        let mut buf = [0u8; 1024];
8637        rng.fill_bytes(&mut buf);
8638        let mut unstructured = Unstructured::new(&buf);
8639        Self::arbitrary(&mut unstructured).unwrap_or_default()
8640    }
8641}
8642impl Default for CELLULAR_CONFIG_DATA {
8643    fn default() -> Self {
8644        Self::DEFAULT.clone()
8645    }
8646}
8647impl MessageData for CELLULAR_CONFIG_DATA {
8648    type Message = MavMessage;
8649    const ID: u32 = 336u32;
8650    const NAME: &'static str = "CELLULAR_CONFIG";
8651    const EXTRA_CRC: u8 = 245u8;
8652    const ENCODED_LEN: usize = 84usize;
8653    fn deser(
8654        _version: MavlinkVersion,
8655        __input: &[u8],
8656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8657        let avail_len = __input.len();
8658        let mut payload_buf = [0; Self::ENCODED_LEN];
8659        let mut buf = if avail_len < Self::ENCODED_LEN {
8660            payload_buf[0..avail_len].copy_from_slice(__input);
8661            Bytes::new(&payload_buf)
8662        } else {
8663            Bytes::new(__input)
8664        };
8665        let mut __struct = Self::default();
8666        __struct.enable_lte = buf.get_u8();
8667        __struct.enable_pin = buf.get_u8();
8668        for v in &mut __struct.pin {
8669            let val = buf.get_u8();
8670            *v = val;
8671        }
8672        for v in &mut __struct.new_pin {
8673            let val = buf.get_u8();
8674            *v = val;
8675        }
8676        for v in &mut __struct.apn {
8677            let val = buf.get_u8();
8678            *v = val;
8679        }
8680        for v in &mut __struct.puk {
8681            let val = buf.get_u8();
8682            *v = val;
8683        }
8684        __struct.roaming = buf.get_u8();
8685        let tmp = buf.get_u8();
8686        __struct.response =
8687            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8688                enum_type: "CellularConfigResponse",
8689                value: tmp as u32,
8690            })?;
8691        Ok(__struct)
8692    }
8693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8694        let mut __tmp = BytesMut::new(bytes);
8695        #[allow(clippy::absurd_extreme_comparisons)]
8696        #[allow(unused_comparisons)]
8697        if __tmp.remaining() < Self::ENCODED_LEN {
8698            panic!(
8699                "buffer is too small (need {} bytes, but got {})",
8700                Self::ENCODED_LEN,
8701                __tmp.remaining(),
8702            )
8703        }
8704        __tmp.put_u8(self.enable_lte);
8705        __tmp.put_u8(self.enable_pin);
8706        for val in &self.pin {
8707            __tmp.put_u8(*val);
8708        }
8709        for val in &self.new_pin {
8710            __tmp.put_u8(*val);
8711        }
8712        for val in &self.apn {
8713            __tmp.put_u8(*val);
8714        }
8715        for val in &self.puk {
8716            __tmp.put_u8(*val);
8717        }
8718        __tmp.put_u8(self.roaming);
8719        __tmp.put_u8(self.response as u8);
8720        if matches!(version, MavlinkVersion::V2) {
8721            let len = __tmp.len();
8722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8723        } else {
8724            __tmp.len()
8725        }
8726    }
8727}
8728#[doc = "Report current used cellular network status."]
8729#[doc = ""]
8730#[doc = "ID: 334"]
8731#[derive(Debug, Clone, PartialEq)]
8732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8734#[cfg_attr(feature = "ts", derive(TS))]
8735#[cfg_attr(feature = "ts", ts(export))]
8736pub struct CELLULAR_STATUS_DATA {
8737    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8738    pub mcc: u16,
8739    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8740    pub mnc: u16,
8741    #[doc = "Location area code. If unknown, set to 0"]
8742    pub lac: u16,
8743    #[doc = "Cellular modem status"]
8744    pub status: CellularStatusFlag,
8745    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8746    pub failure_reason: CellularNetworkFailedReason,
8747    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8748    pub mavtype: CellularNetworkRadioType,
8749    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8750    pub quality: u8,
8751}
8752impl CELLULAR_STATUS_DATA {
8753    pub const ENCODED_LEN: usize = 10usize;
8754    pub const DEFAULT: Self = Self {
8755        mcc: 0_u16,
8756        mnc: 0_u16,
8757        lac: 0_u16,
8758        status: CellularStatusFlag::DEFAULT,
8759        failure_reason: CellularNetworkFailedReason::DEFAULT,
8760        mavtype: CellularNetworkRadioType::DEFAULT,
8761        quality: 0_u8,
8762    };
8763    #[cfg(feature = "arbitrary")]
8764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8765        use arbitrary::{Arbitrary, Unstructured};
8766        let mut buf = [0u8; 1024];
8767        rng.fill_bytes(&mut buf);
8768        let mut unstructured = Unstructured::new(&buf);
8769        Self::arbitrary(&mut unstructured).unwrap_or_default()
8770    }
8771}
8772impl Default for CELLULAR_STATUS_DATA {
8773    fn default() -> Self {
8774        Self::DEFAULT.clone()
8775    }
8776}
8777impl MessageData for CELLULAR_STATUS_DATA {
8778    type Message = MavMessage;
8779    const ID: u32 = 334u32;
8780    const NAME: &'static str = "CELLULAR_STATUS";
8781    const EXTRA_CRC: u8 = 72u8;
8782    const ENCODED_LEN: usize = 10usize;
8783    fn deser(
8784        _version: MavlinkVersion,
8785        __input: &[u8],
8786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8787        let avail_len = __input.len();
8788        let mut payload_buf = [0; Self::ENCODED_LEN];
8789        let mut buf = if avail_len < Self::ENCODED_LEN {
8790            payload_buf[0..avail_len].copy_from_slice(__input);
8791            Bytes::new(&payload_buf)
8792        } else {
8793            Bytes::new(__input)
8794        };
8795        let mut __struct = Self::default();
8796        __struct.mcc = buf.get_u16_le();
8797        __struct.mnc = buf.get_u16_le();
8798        __struct.lac = buf.get_u16_le();
8799        let tmp = buf.get_u8();
8800        __struct.status =
8801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8802                enum_type: "CellularStatusFlag",
8803                value: tmp as u32,
8804            })?;
8805        let tmp = buf.get_u8();
8806        __struct.failure_reason =
8807            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8808                enum_type: "CellularNetworkFailedReason",
8809                value: tmp as u32,
8810            })?;
8811        let tmp = buf.get_u8();
8812        __struct.mavtype =
8813            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8814                enum_type: "CellularNetworkRadioType",
8815                value: tmp as u32,
8816            })?;
8817        __struct.quality = buf.get_u8();
8818        Ok(__struct)
8819    }
8820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8821        let mut __tmp = BytesMut::new(bytes);
8822        #[allow(clippy::absurd_extreme_comparisons)]
8823        #[allow(unused_comparisons)]
8824        if __tmp.remaining() < Self::ENCODED_LEN {
8825            panic!(
8826                "buffer is too small (need {} bytes, but got {})",
8827                Self::ENCODED_LEN,
8828                __tmp.remaining(),
8829            )
8830        }
8831        __tmp.put_u16_le(self.mcc);
8832        __tmp.put_u16_le(self.mnc);
8833        __tmp.put_u16_le(self.lac);
8834        __tmp.put_u8(self.status as u8);
8835        __tmp.put_u8(self.failure_reason as u8);
8836        __tmp.put_u8(self.mavtype as u8);
8837        __tmp.put_u8(self.quality);
8838        if matches!(version, MavlinkVersion::V2) {
8839            let len = __tmp.len();
8840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8841        } else {
8842            __tmp.len()
8843        }
8844    }
8845}
8846#[doc = "Request to control this MAV."]
8847#[doc = ""]
8848#[doc = "ID: 5"]
8849#[derive(Debug, Clone, PartialEq)]
8850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8852#[cfg_attr(feature = "ts", derive(TS))]
8853#[cfg_attr(feature = "ts", ts(export))]
8854pub struct CHANGE_OPERATOR_CONTROL_DATA {
8855    #[doc = "System the GCS requests control for"]
8856    pub target_system: u8,
8857    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8858    pub control_request: u8,
8859    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8860    pub version: u8,
8861    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8864    pub passkey: [u8; 25],
8865}
8866impl CHANGE_OPERATOR_CONTROL_DATA {
8867    pub const ENCODED_LEN: usize = 28usize;
8868    pub const DEFAULT: Self = Self {
8869        target_system: 0_u8,
8870        control_request: 0_u8,
8871        version: 0_u8,
8872        passkey: [0_u8; 25usize],
8873    };
8874    #[cfg(feature = "arbitrary")]
8875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8876        use arbitrary::{Arbitrary, Unstructured};
8877        let mut buf = [0u8; 1024];
8878        rng.fill_bytes(&mut buf);
8879        let mut unstructured = Unstructured::new(&buf);
8880        Self::arbitrary(&mut unstructured).unwrap_or_default()
8881    }
8882}
8883impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8884    fn default() -> Self {
8885        Self::DEFAULT.clone()
8886    }
8887}
8888impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8889    type Message = MavMessage;
8890    const ID: u32 = 5u32;
8891    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8892    const EXTRA_CRC: u8 = 217u8;
8893    const ENCODED_LEN: usize = 28usize;
8894    fn deser(
8895        _version: MavlinkVersion,
8896        __input: &[u8],
8897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8898        let avail_len = __input.len();
8899        let mut payload_buf = [0; Self::ENCODED_LEN];
8900        let mut buf = if avail_len < Self::ENCODED_LEN {
8901            payload_buf[0..avail_len].copy_from_slice(__input);
8902            Bytes::new(&payload_buf)
8903        } else {
8904            Bytes::new(__input)
8905        };
8906        let mut __struct = Self::default();
8907        __struct.target_system = buf.get_u8();
8908        __struct.control_request = buf.get_u8();
8909        __struct.version = buf.get_u8();
8910        for v in &mut __struct.passkey {
8911            let val = buf.get_u8();
8912            *v = val;
8913        }
8914        Ok(__struct)
8915    }
8916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8917        let mut __tmp = BytesMut::new(bytes);
8918        #[allow(clippy::absurd_extreme_comparisons)]
8919        #[allow(unused_comparisons)]
8920        if __tmp.remaining() < Self::ENCODED_LEN {
8921            panic!(
8922                "buffer is too small (need {} bytes, but got {})",
8923                Self::ENCODED_LEN,
8924                __tmp.remaining(),
8925            )
8926        }
8927        __tmp.put_u8(self.target_system);
8928        __tmp.put_u8(self.control_request);
8929        __tmp.put_u8(self.version);
8930        for val in &self.passkey {
8931            __tmp.put_u8(*val);
8932        }
8933        if matches!(version, MavlinkVersion::V2) {
8934            let len = __tmp.len();
8935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8936        } else {
8937            __tmp.len()
8938        }
8939    }
8940}
8941#[doc = "Accept / deny control of this MAV."]
8942#[doc = ""]
8943#[doc = "ID: 6"]
8944#[derive(Debug, Clone, PartialEq)]
8945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8947#[cfg_attr(feature = "ts", derive(TS))]
8948#[cfg_attr(feature = "ts", ts(export))]
8949pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8950    #[doc = "ID of the GCS this message"]
8951    pub gcs_system_id: u8,
8952    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8953    pub control_request: u8,
8954    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8955    pub ack: u8,
8956}
8957impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8958    pub const ENCODED_LEN: usize = 3usize;
8959    pub const DEFAULT: Self = Self {
8960        gcs_system_id: 0_u8,
8961        control_request: 0_u8,
8962        ack: 0_u8,
8963    };
8964    #[cfg(feature = "arbitrary")]
8965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8966        use arbitrary::{Arbitrary, Unstructured};
8967        let mut buf = [0u8; 1024];
8968        rng.fill_bytes(&mut buf);
8969        let mut unstructured = Unstructured::new(&buf);
8970        Self::arbitrary(&mut unstructured).unwrap_or_default()
8971    }
8972}
8973impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8974    fn default() -> Self {
8975        Self::DEFAULT.clone()
8976    }
8977}
8978impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8979    type Message = MavMessage;
8980    const ID: u32 = 6u32;
8981    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8982    const EXTRA_CRC: u8 = 104u8;
8983    const ENCODED_LEN: usize = 3usize;
8984    fn deser(
8985        _version: MavlinkVersion,
8986        __input: &[u8],
8987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8988        let avail_len = __input.len();
8989        let mut payload_buf = [0; Self::ENCODED_LEN];
8990        let mut buf = if avail_len < Self::ENCODED_LEN {
8991            payload_buf[0..avail_len].copy_from_slice(__input);
8992            Bytes::new(&payload_buf)
8993        } else {
8994            Bytes::new(__input)
8995        };
8996        let mut __struct = Self::default();
8997        __struct.gcs_system_id = buf.get_u8();
8998        __struct.control_request = buf.get_u8();
8999        __struct.ack = buf.get_u8();
9000        Ok(__struct)
9001    }
9002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9003        let mut __tmp = BytesMut::new(bytes);
9004        #[allow(clippy::absurd_extreme_comparisons)]
9005        #[allow(unused_comparisons)]
9006        if __tmp.remaining() < Self::ENCODED_LEN {
9007            panic!(
9008                "buffer is too small (need {} bytes, but got {})",
9009                Self::ENCODED_LEN,
9010                __tmp.remaining(),
9011            )
9012        }
9013        __tmp.put_u8(self.gcs_system_id);
9014        __tmp.put_u8(self.control_request);
9015        __tmp.put_u8(self.ack);
9016        if matches!(version, MavlinkVersion::V2) {
9017            let len = __tmp.len();
9018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9019        } else {
9020            __tmp.len()
9021        }
9022    }
9023}
9024#[doc = "Information about a potential collision."]
9025#[doc = ""]
9026#[doc = "ID: 247"]
9027#[derive(Debug, Clone, PartialEq)]
9028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9030#[cfg_attr(feature = "ts", derive(TS))]
9031#[cfg_attr(feature = "ts", ts(export))]
9032pub struct COLLISION_DATA {
9033    #[doc = "Unique identifier, domain based on src field"]
9034    pub id: u32,
9035    #[doc = "Estimated time until collision occurs"]
9036    pub time_to_minimum_delta: f32,
9037    #[doc = "Closest vertical distance between vehicle and object"]
9038    pub altitude_minimum_delta: f32,
9039    #[doc = "Closest horizontal distance between vehicle and object"]
9040    pub horizontal_minimum_delta: f32,
9041    #[doc = "Collision data source"]
9042    pub src: MavCollisionSrc,
9043    #[doc = "Action that is being taken to avoid this collision"]
9044    pub action: MavCollisionAction,
9045    #[doc = "How concerned the aircraft is about this collision"]
9046    pub threat_level: MavCollisionThreatLevel,
9047}
9048impl COLLISION_DATA {
9049    pub const ENCODED_LEN: usize = 19usize;
9050    pub const DEFAULT: Self = Self {
9051        id: 0_u32,
9052        time_to_minimum_delta: 0.0_f32,
9053        altitude_minimum_delta: 0.0_f32,
9054        horizontal_minimum_delta: 0.0_f32,
9055        src: MavCollisionSrc::DEFAULT,
9056        action: MavCollisionAction::DEFAULT,
9057        threat_level: MavCollisionThreatLevel::DEFAULT,
9058    };
9059    #[cfg(feature = "arbitrary")]
9060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9061        use arbitrary::{Arbitrary, Unstructured};
9062        let mut buf = [0u8; 1024];
9063        rng.fill_bytes(&mut buf);
9064        let mut unstructured = Unstructured::new(&buf);
9065        Self::arbitrary(&mut unstructured).unwrap_or_default()
9066    }
9067}
9068impl Default for COLLISION_DATA {
9069    fn default() -> Self {
9070        Self::DEFAULT.clone()
9071    }
9072}
9073impl MessageData for COLLISION_DATA {
9074    type Message = MavMessage;
9075    const ID: u32 = 247u32;
9076    const NAME: &'static str = "COLLISION";
9077    const EXTRA_CRC: u8 = 81u8;
9078    const ENCODED_LEN: usize = 19usize;
9079    fn deser(
9080        _version: MavlinkVersion,
9081        __input: &[u8],
9082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9083        let avail_len = __input.len();
9084        let mut payload_buf = [0; Self::ENCODED_LEN];
9085        let mut buf = if avail_len < Self::ENCODED_LEN {
9086            payload_buf[0..avail_len].copy_from_slice(__input);
9087            Bytes::new(&payload_buf)
9088        } else {
9089            Bytes::new(__input)
9090        };
9091        let mut __struct = Self::default();
9092        __struct.id = buf.get_u32_le();
9093        __struct.time_to_minimum_delta = buf.get_f32_le();
9094        __struct.altitude_minimum_delta = buf.get_f32_le();
9095        __struct.horizontal_minimum_delta = buf.get_f32_le();
9096        let tmp = buf.get_u8();
9097        __struct.src =
9098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9099                enum_type: "MavCollisionSrc",
9100                value: tmp as u32,
9101            })?;
9102        let tmp = buf.get_u8();
9103        __struct.action =
9104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9105                enum_type: "MavCollisionAction",
9106                value: tmp as u32,
9107            })?;
9108        let tmp = buf.get_u8();
9109        __struct.threat_level =
9110            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9111                enum_type: "MavCollisionThreatLevel",
9112                value: tmp as u32,
9113            })?;
9114        Ok(__struct)
9115    }
9116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9117        let mut __tmp = BytesMut::new(bytes);
9118        #[allow(clippy::absurd_extreme_comparisons)]
9119        #[allow(unused_comparisons)]
9120        if __tmp.remaining() < Self::ENCODED_LEN {
9121            panic!(
9122                "buffer is too small (need {} bytes, but got {})",
9123                Self::ENCODED_LEN,
9124                __tmp.remaining(),
9125            )
9126        }
9127        __tmp.put_u32_le(self.id);
9128        __tmp.put_f32_le(self.time_to_minimum_delta);
9129        __tmp.put_f32_le(self.altitude_minimum_delta);
9130        __tmp.put_f32_le(self.horizontal_minimum_delta);
9131        __tmp.put_u8(self.src as u8);
9132        __tmp.put_u8(self.action as u8);
9133        __tmp.put_u8(self.threat_level as u8);
9134        if matches!(version, MavlinkVersion::V2) {
9135            let len = __tmp.len();
9136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9137        } else {
9138            __tmp.len()
9139        }
9140    }
9141}
9142#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9143#[doc = ""]
9144#[doc = "ID: 77"]
9145#[derive(Debug, Clone, PartialEq)]
9146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9148#[cfg_attr(feature = "ts", derive(TS))]
9149#[cfg_attr(feature = "ts", ts(export))]
9150pub struct COMMAND_ACK_DATA {
9151    #[doc = "Command ID (of acknowledged command)."]
9152    pub command: MavCmd,
9153    #[doc = "Result of command."]
9154    pub result: MavResult,
9155    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9157    pub progress: u8,
9158    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9159    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9160    pub result_param2: i32,
9161    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9162    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9163    pub target_system: u8,
9164    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9166    pub target_component: u8,
9167}
9168impl COMMAND_ACK_DATA {
9169    pub const ENCODED_LEN: usize = 10usize;
9170    pub const DEFAULT: Self = Self {
9171        command: MavCmd::DEFAULT,
9172        result: MavResult::DEFAULT,
9173        progress: 0_u8,
9174        result_param2: 0_i32,
9175        target_system: 0_u8,
9176        target_component: 0_u8,
9177    };
9178    #[cfg(feature = "arbitrary")]
9179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9180        use arbitrary::{Arbitrary, Unstructured};
9181        let mut buf = [0u8; 1024];
9182        rng.fill_bytes(&mut buf);
9183        let mut unstructured = Unstructured::new(&buf);
9184        Self::arbitrary(&mut unstructured).unwrap_or_default()
9185    }
9186}
9187impl Default for COMMAND_ACK_DATA {
9188    fn default() -> Self {
9189        Self::DEFAULT.clone()
9190    }
9191}
9192impl MessageData for COMMAND_ACK_DATA {
9193    type Message = MavMessage;
9194    const ID: u32 = 77u32;
9195    const NAME: &'static str = "COMMAND_ACK";
9196    const EXTRA_CRC: u8 = 143u8;
9197    const ENCODED_LEN: usize = 10usize;
9198    fn deser(
9199        _version: MavlinkVersion,
9200        __input: &[u8],
9201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9202        let avail_len = __input.len();
9203        let mut payload_buf = [0; Self::ENCODED_LEN];
9204        let mut buf = if avail_len < Self::ENCODED_LEN {
9205            payload_buf[0..avail_len].copy_from_slice(__input);
9206            Bytes::new(&payload_buf)
9207        } else {
9208            Bytes::new(__input)
9209        };
9210        let mut __struct = Self::default();
9211        let tmp = buf.get_u16_le();
9212        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9213            ::mavlink_core::error::ParserError::InvalidEnum {
9214                enum_type: "MavCmd",
9215                value: tmp as u32,
9216            },
9217        )?;
9218        let tmp = buf.get_u8();
9219        __struct.result =
9220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9221                enum_type: "MavResult",
9222                value: tmp as u32,
9223            })?;
9224        __struct.progress = buf.get_u8();
9225        __struct.result_param2 = buf.get_i32_le();
9226        __struct.target_system = buf.get_u8();
9227        __struct.target_component = buf.get_u8();
9228        Ok(__struct)
9229    }
9230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9231        let mut __tmp = BytesMut::new(bytes);
9232        #[allow(clippy::absurd_extreme_comparisons)]
9233        #[allow(unused_comparisons)]
9234        if __tmp.remaining() < Self::ENCODED_LEN {
9235            panic!(
9236                "buffer is too small (need {} bytes, but got {})",
9237                Self::ENCODED_LEN,
9238                __tmp.remaining(),
9239            )
9240        }
9241        __tmp.put_u16_le(self.command as u16);
9242        __tmp.put_u8(self.result as u8);
9243        if matches!(version, MavlinkVersion::V2) {
9244            __tmp.put_u8(self.progress);
9245            __tmp.put_i32_le(self.result_param2);
9246            __tmp.put_u8(self.target_system);
9247            __tmp.put_u8(self.target_component);
9248            let len = __tmp.len();
9249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9250        } else {
9251            __tmp.len()
9252        }
9253    }
9254}
9255#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9256#[doc = ""]
9257#[doc = "ID: 80"]
9258#[derive(Debug, Clone, PartialEq)]
9259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9261#[cfg_attr(feature = "ts", derive(TS))]
9262#[cfg_attr(feature = "ts", ts(export))]
9263pub struct COMMAND_CANCEL_DATA {
9264    #[doc = "Command ID (of command to cancel)."]
9265    pub command: MavCmd,
9266    #[doc = "System executing long running command. Should not be broadcast (0)."]
9267    pub target_system: u8,
9268    #[doc = "Component executing long running command."]
9269    pub target_component: u8,
9270}
9271impl COMMAND_CANCEL_DATA {
9272    pub const ENCODED_LEN: usize = 4usize;
9273    pub const DEFAULT: Self = Self {
9274        command: MavCmd::DEFAULT,
9275        target_system: 0_u8,
9276        target_component: 0_u8,
9277    };
9278    #[cfg(feature = "arbitrary")]
9279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9280        use arbitrary::{Arbitrary, Unstructured};
9281        let mut buf = [0u8; 1024];
9282        rng.fill_bytes(&mut buf);
9283        let mut unstructured = Unstructured::new(&buf);
9284        Self::arbitrary(&mut unstructured).unwrap_or_default()
9285    }
9286}
9287impl Default for COMMAND_CANCEL_DATA {
9288    fn default() -> Self {
9289        Self::DEFAULT.clone()
9290    }
9291}
9292impl MessageData for COMMAND_CANCEL_DATA {
9293    type Message = MavMessage;
9294    const ID: u32 = 80u32;
9295    const NAME: &'static str = "COMMAND_CANCEL";
9296    const EXTRA_CRC: u8 = 14u8;
9297    const ENCODED_LEN: usize = 4usize;
9298    fn deser(
9299        _version: MavlinkVersion,
9300        __input: &[u8],
9301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9302        let avail_len = __input.len();
9303        let mut payload_buf = [0; Self::ENCODED_LEN];
9304        let mut buf = if avail_len < Self::ENCODED_LEN {
9305            payload_buf[0..avail_len].copy_from_slice(__input);
9306            Bytes::new(&payload_buf)
9307        } else {
9308            Bytes::new(__input)
9309        };
9310        let mut __struct = Self::default();
9311        let tmp = buf.get_u16_le();
9312        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9313            ::mavlink_core::error::ParserError::InvalidEnum {
9314                enum_type: "MavCmd",
9315                value: tmp as u32,
9316            },
9317        )?;
9318        __struct.target_system = buf.get_u8();
9319        __struct.target_component = buf.get_u8();
9320        Ok(__struct)
9321    }
9322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9323        let mut __tmp = BytesMut::new(bytes);
9324        #[allow(clippy::absurd_extreme_comparisons)]
9325        #[allow(unused_comparisons)]
9326        if __tmp.remaining() < Self::ENCODED_LEN {
9327            panic!(
9328                "buffer is too small (need {} bytes, but got {})",
9329                Self::ENCODED_LEN,
9330                __tmp.remaining(),
9331            )
9332        }
9333        __tmp.put_u16_le(self.command as u16);
9334        __tmp.put_u8(self.target_system);
9335        __tmp.put_u8(self.target_component);
9336        if matches!(version, MavlinkVersion::V2) {
9337            let len = __tmp.len();
9338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9339        } else {
9340            __tmp.len()
9341        }
9342    }
9343}
9344#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9345#[doc = ""]
9346#[doc = "ID: 75"]
9347#[derive(Debug, Clone, PartialEq)]
9348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9350#[cfg_attr(feature = "ts", derive(TS))]
9351#[cfg_attr(feature = "ts", ts(export))]
9352pub struct COMMAND_INT_DATA {
9353    #[doc = "PARAM1, see MAV_CMD enum"]
9354    pub param1: f32,
9355    #[doc = "PARAM2, see MAV_CMD enum"]
9356    pub param2: f32,
9357    #[doc = "PARAM3, see MAV_CMD enum"]
9358    pub param3: f32,
9359    #[doc = "PARAM4, see MAV_CMD enum"]
9360    pub param4: f32,
9361    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9362    pub x: i32,
9363    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9364    pub y: i32,
9365    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9366    pub z: f32,
9367    #[doc = "The scheduled action for the mission item."]
9368    pub command: MavCmd,
9369    #[doc = "System ID"]
9370    pub target_system: u8,
9371    #[doc = "Component ID"]
9372    pub target_component: u8,
9373    #[doc = "The coordinate system of the COMMAND."]
9374    pub frame: MavFrame,
9375    #[doc = "Not used."]
9376    pub current: u8,
9377    #[doc = "Not used (set 0)."]
9378    pub autocontinue: u8,
9379}
9380impl COMMAND_INT_DATA {
9381    pub const ENCODED_LEN: usize = 35usize;
9382    pub const DEFAULT: Self = Self {
9383        param1: 0.0_f32,
9384        param2: 0.0_f32,
9385        param3: 0.0_f32,
9386        param4: 0.0_f32,
9387        x: 0_i32,
9388        y: 0_i32,
9389        z: 0.0_f32,
9390        command: MavCmd::DEFAULT,
9391        target_system: 0_u8,
9392        target_component: 0_u8,
9393        frame: MavFrame::DEFAULT,
9394        current: 0_u8,
9395        autocontinue: 0_u8,
9396    };
9397    #[cfg(feature = "arbitrary")]
9398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9399        use arbitrary::{Arbitrary, Unstructured};
9400        let mut buf = [0u8; 1024];
9401        rng.fill_bytes(&mut buf);
9402        let mut unstructured = Unstructured::new(&buf);
9403        Self::arbitrary(&mut unstructured).unwrap_or_default()
9404    }
9405}
9406impl Default for COMMAND_INT_DATA {
9407    fn default() -> Self {
9408        Self::DEFAULT.clone()
9409    }
9410}
9411impl MessageData for COMMAND_INT_DATA {
9412    type Message = MavMessage;
9413    const ID: u32 = 75u32;
9414    const NAME: &'static str = "COMMAND_INT";
9415    const EXTRA_CRC: u8 = 158u8;
9416    const ENCODED_LEN: usize = 35usize;
9417    fn deser(
9418        _version: MavlinkVersion,
9419        __input: &[u8],
9420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9421        let avail_len = __input.len();
9422        let mut payload_buf = [0; Self::ENCODED_LEN];
9423        let mut buf = if avail_len < Self::ENCODED_LEN {
9424            payload_buf[0..avail_len].copy_from_slice(__input);
9425            Bytes::new(&payload_buf)
9426        } else {
9427            Bytes::new(__input)
9428        };
9429        let mut __struct = Self::default();
9430        __struct.param1 = buf.get_f32_le();
9431        __struct.param2 = buf.get_f32_le();
9432        __struct.param3 = buf.get_f32_le();
9433        __struct.param4 = buf.get_f32_le();
9434        __struct.x = buf.get_i32_le();
9435        __struct.y = buf.get_i32_le();
9436        __struct.z = buf.get_f32_le();
9437        let tmp = buf.get_u16_le();
9438        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9439            ::mavlink_core::error::ParserError::InvalidEnum {
9440                enum_type: "MavCmd",
9441                value: tmp as u32,
9442            },
9443        )?;
9444        __struct.target_system = buf.get_u8();
9445        __struct.target_component = buf.get_u8();
9446        let tmp = buf.get_u8();
9447        __struct.frame =
9448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9449                enum_type: "MavFrame",
9450                value: tmp as u32,
9451            })?;
9452        __struct.current = buf.get_u8();
9453        __struct.autocontinue = buf.get_u8();
9454        Ok(__struct)
9455    }
9456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9457        let mut __tmp = BytesMut::new(bytes);
9458        #[allow(clippy::absurd_extreme_comparisons)]
9459        #[allow(unused_comparisons)]
9460        if __tmp.remaining() < Self::ENCODED_LEN {
9461            panic!(
9462                "buffer is too small (need {} bytes, but got {})",
9463                Self::ENCODED_LEN,
9464                __tmp.remaining(),
9465            )
9466        }
9467        __tmp.put_f32_le(self.param1);
9468        __tmp.put_f32_le(self.param2);
9469        __tmp.put_f32_le(self.param3);
9470        __tmp.put_f32_le(self.param4);
9471        __tmp.put_i32_le(self.x);
9472        __tmp.put_i32_le(self.y);
9473        __tmp.put_f32_le(self.z);
9474        __tmp.put_u16_le(self.command as u16);
9475        __tmp.put_u8(self.target_system);
9476        __tmp.put_u8(self.target_component);
9477        __tmp.put_u8(self.frame as u8);
9478        __tmp.put_u8(self.current);
9479        __tmp.put_u8(self.autocontinue);
9480        if matches!(version, MavlinkVersion::V2) {
9481            let len = __tmp.len();
9482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9483        } else {
9484            __tmp.len()
9485        }
9486    }
9487}
9488#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9489#[doc = ""]
9490#[doc = "ID: 76"]
9491#[derive(Debug, Clone, PartialEq)]
9492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9494#[cfg_attr(feature = "ts", derive(TS))]
9495#[cfg_attr(feature = "ts", ts(export))]
9496pub struct COMMAND_LONG_DATA {
9497    #[doc = "Parameter 1 (for the specific command)."]
9498    pub param1: f32,
9499    #[doc = "Parameter 2 (for the specific command)."]
9500    pub param2: f32,
9501    #[doc = "Parameter 3 (for the specific command)."]
9502    pub param3: f32,
9503    #[doc = "Parameter 4 (for the specific command)."]
9504    pub param4: f32,
9505    #[doc = "Parameter 5 (for the specific command)."]
9506    pub param5: f32,
9507    #[doc = "Parameter 6 (for the specific command)."]
9508    pub param6: f32,
9509    #[doc = "Parameter 7 (for the specific command)."]
9510    pub param7: f32,
9511    #[doc = "Command ID (of command to send)."]
9512    pub command: MavCmd,
9513    #[doc = "System which should execute the command"]
9514    pub target_system: u8,
9515    #[doc = "Component which should execute the command, 0 for all components"]
9516    pub target_component: u8,
9517    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9518    pub confirmation: u8,
9519}
9520impl COMMAND_LONG_DATA {
9521    pub const ENCODED_LEN: usize = 33usize;
9522    pub const DEFAULT: Self = Self {
9523        param1: 0.0_f32,
9524        param2: 0.0_f32,
9525        param3: 0.0_f32,
9526        param4: 0.0_f32,
9527        param5: 0.0_f32,
9528        param6: 0.0_f32,
9529        param7: 0.0_f32,
9530        command: MavCmd::DEFAULT,
9531        target_system: 0_u8,
9532        target_component: 0_u8,
9533        confirmation: 0_u8,
9534    };
9535    #[cfg(feature = "arbitrary")]
9536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9537        use arbitrary::{Arbitrary, Unstructured};
9538        let mut buf = [0u8; 1024];
9539        rng.fill_bytes(&mut buf);
9540        let mut unstructured = Unstructured::new(&buf);
9541        Self::arbitrary(&mut unstructured).unwrap_or_default()
9542    }
9543}
9544impl Default for COMMAND_LONG_DATA {
9545    fn default() -> Self {
9546        Self::DEFAULT.clone()
9547    }
9548}
9549impl MessageData for COMMAND_LONG_DATA {
9550    type Message = MavMessage;
9551    const ID: u32 = 76u32;
9552    const NAME: &'static str = "COMMAND_LONG";
9553    const EXTRA_CRC: u8 = 152u8;
9554    const ENCODED_LEN: usize = 33usize;
9555    fn deser(
9556        _version: MavlinkVersion,
9557        __input: &[u8],
9558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9559        let avail_len = __input.len();
9560        let mut payload_buf = [0; Self::ENCODED_LEN];
9561        let mut buf = if avail_len < Self::ENCODED_LEN {
9562            payload_buf[0..avail_len].copy_from_slice(__input);
9563            Bytes::new(&payload_buf)
9564        } else {
9565            Bytes::new(__input)
9566        };
9567        let mut __struct = Self::default();
9568        __struct.param1 = buf.get_f32_le();
9569        __struct.param2 = buf.get_f32_le();
9570        __struct.param3 = buf.get_f32_le();
9571        __struct.param4 = buf.get_f32_le();
9572        __struct.param5 = buf.get_f32_le();
9573        __struct.param6 = buf.get_f32_le();
9574        __struct.param7 = buf.get_f32_le();
9575        let tmp = buf.get_u16_le();
9576        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9577            ::mavlink_core::error::ParserError::InvalidEnum {
9578                enum_type: "MavCmd",
9579                value: tmp as u32,
9580            },
9581        )?;
9582        __struct.target_system = buf.get_u8();
9583        __struct.target_component = buf.get_u8();
9584        __struct.confirmation = buf.get_u8();
9585        Ok(__struct)
9586    }
9587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9588        let mut __tmp = BytesMut::new(bytes);
9589        #[allow(clippy::absurd_extreme_comparisons)]
9590        #[allow(unused_comparisons)]
9591        if __tmp.remaining() < Self::ENCODED_LEN {
9592            panic!(
9593                "buffer is too small (need {} bytes, but got {})",
9594                Self::ENCODED_LEN,
9595                __tmp.remaining(),
9596            )
9597        }
9598        __tmp.put_f32_le(self.param1);
9599        __tmp.put_f32_le(self.param2);
9600        __tmp.put_f32_le(self.param3);
9601        __tmp.put_f32_le(self.param4);
9602        __tmp.put_f32_le(self.param5);
9603        __tmp.put_f32_le(self.param6);
9604        __tmp.put_f32_le(self.param7);
9605        __tmp.put_u16_le(self.command as u16);
9606        __tmp.put_u8(self.target_system);
9607        __tmp.put_u8(self.target_component);
9608        __tmp.put_u8(self.confirmation);
9609        if matches!(version, MavlinkVersion::V2) {
9610            let len = __tmp.len();
9611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9612        } else {
9613            __tmp.len()
9614        }
9615    }
9616}
9617#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9618#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9619#[doc = ""]
9620#[doc = "ID: 395"]
9621#[derive(Debug, Clone, PartialEq)]
9622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9624#[cfg_attr(feature = "ts", derive(TS))]
9625#[cfg_attr(feature = "ts", ts(export))]
9626pub struct COMPONENT_INFORMATION_DATA {
9627    #[doc = "Timestamp (time since system boot)."]
9628    pub time_boot_ms: u32,
9629    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9630    pub general_metadata_file_crc: u32,
9631    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9632    pub peripherals_metadata_file_crc: u32,
9633    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9634    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9635    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9636    pub general_metadata_uri: [u8; 100],
9637    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9639    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9640    pub peripherals_metadata_uri: [u8; 100],
9641}
9642impl COMPONENT_INFORMATION_DATA {
9643    pub const ENCODED_LEN: usize = 212usize;
9644    pub const DEFAULT: Self = Self {
9645        time_boot_ms: 0_u32,
9646        general_metadata_file_crc: 0_u32,
9647        peripherals_metadata_file_crc: 0_u32,
9648        general_metadata_uri: [0_u8; 100usize],
9649        peripherals_metadata_uri: [0_u8; 100usize],
9650    };
9651    #[cfg(feature = "arbitrary")]
9652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9653        use arbitrary::{Arbitrary, Unstructured};
9654        let mut buf = [0u8; 1024];
9655        rng.fill_bytes(&mut buf);
9656        let mut unstructured = Unstructured::new(&buf);
9657        Self::arbitrary(&mut unstructured).unwrap_or_default()
9658    }
9659}
9660impl Default for COMPONENT_INFORMATION_DATA {
9661    fn default() -> Self {
9662        Self::DEFAULT.clone()
9663    }
9664}
9665impl MessageData for COMPONENT_INFORMATION_DATA {
9666    type Message = MavMessage;
9667    const ID: u32 = 395u32;
9668    const NAME: &'static str = "COMPONENT_INFORMATION";
9669    const EXTRA_CRC: u8 = 0u8;
9670    const ENCODED_LEN: usize = 212usize;
9671    fn deser(
9672        _version: MavlinkVersion,
9673        __input: &[u8],
9674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9675        let avail_len = __input.len();
9676        let mut payload_buf = [0; Self::ENCODED_LEN];
9677        let mut buf = if avail_len < Self::ENCODED_LEN {
9678            payload_buf[0..avail_len].copy_from_slice(__input);
9679            Bytes::new(&payload_buf)
9680        } else {
9681            Bytes::new(__input)
9682        };
9683        let mut __struct = Self::default();
9684        __struct.time_boot_ms = buf.get_u32_le();
9685        __struct.general_metadata_file_crc = buf.get_u32_le();
9686        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9687        for v in &mut __struct.general_metadata_uri {
9688            let val = buf.get_u8();
9689            *v = val;
9690        }
9691        for v in &mut __struct.peripherals_metadata_uri {
9692            let val = buf.get_u8();
9693            *v = val;
9694        }
9695        Ok(__struct)
9696    }
9697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9698        let mut __tmp = BytesMut::new(bytes);
9699        #[allow(clippy::absurd_extreme_comparisons)]
9700        #[allow(unused_comparisons)]
9701        if __tmp.remaining() < Self::ENCODED_LEN {
9702            panic!(
9703                "buffer is too small (need {} bytes, but got {})",
9704                Self::ENCODED_LEN,
9705                __tmp.remaining(),
9706            )
9707        }
9708        __tmp.put_u32_le(self.time_boot_ms);
9709        __tmp.put_u32_le(self.general_metadata_file_crc);
9710        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9711        for val in &self.general_metadata_uri {
9712            __tmp.put_u8(*val);
9713        }
9714        for val in &self.peripherals_metadata_uri {
9715            __tmp.put_u8(*val);
9716        }
9717        if matches!(version, MavlinkVersion::V2) {
9718            let len = __tmp.len();
9719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9720        } else {
9721            __tmp.len()
9722        }
9723    }
9724}
9725#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9726#[doc = ""]
9727#[doc = "ID: 396"]
9728#[derive(Debug, Clone, PartialEq)]
9729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9731#[cfg_attr(feature = "ts", derive(TS))]
9732#[cfg_attr(feature = "ts", ts(export))]
9733pub struct COMPONENT_INFORMATION_BASIC_DATA {
9734    #[doc = "Component capability flags"]
9735    pub capabilities: MavProtocolCapability,
9736    #[doc = "Timestamp (time since system boot)."]
9737    pub time_boot_ms: u32,
9738    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9739    pub time_manufacture_s: u32,
9740    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9741    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9742    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9743    pub vendor_name: [u8; 32],
9744    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9745    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9746    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9747    pub model_name: [u8; 32],
9748    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9749    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9750    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9751    pub software_version: [u8; 24],
9752    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9754    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9755    pub hardware_version: [u8; 24],
9756    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9759    pub serial_number: [u8; 32],
9760}
9761impl COMPONENT_INFORMATION_BASIC_DATA {
9762    pub const ENCODED_LEN: usize = 160usize;
9763    pub const DEFAULT: Self = Self {
9764        capabilities: MavProtocolCapability::DEFAULT,
9765        time_boot_ms: 0_u32,
9766        time_manufacture_s: 0_u32,
9767        vendor_name: [0_u8; 32usize],
9768        model_name: [0_u8; 32usize],
9769        software_version: [0_u8; 24usize],
9770        hardware_version: [0_u8; 24usize],
9771        serial_number: [0_u8; 32usize],
9772    };
9773    #[cfg(feature = "arbitrary")]
9774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9775        use arbitrary::{Arbitrary, Unstructured};
9776        let mut buf = [0u8; 1024];
9777        rng.fill_bytes(&mut buf);
9778        let mut unstructured = Unstructured::new(&buf);
9779        Self::arbitrary(&mut unstructured).unwrap_or_default()
9780    }
9781}
9782impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9783    fn default() -> Self {
9784        Self::DEFAULT.clone()
9785    }
9786}
9787impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9788    type Message = MavMessage;
9789    const ID: u32 = 396u32;
9790    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9791    const EXTRA_CRC: u8 = 50u8;
9792    const ENCODED_LEN: usize = 160usize;
9793    fn deser(
9794        _version: MavlinkVersion,
9795        __input: &[u8],
9796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9797        let avail_len = __input.len();
9798        let mut payload_buf = [0; Self::ENCODED_LEN];
9799        let mut buf = if avail_len < Self::ENCODED_LEN {
9800            payload_buf[0..avail_len].copy_from_slice(__input);
9801            Bytes::new(&payload_buf)
9802        } else {
9803            Bytes::new(__input)
9804        };
9805        let mut __struct = Self::default();
9806        let tmp = buf.get_u64_le();
9807        __struct.capabilities = MavProtocolCapability::from_bits(
9808            tmp & MavProtocolCapability::all().bits(),
9809        )
9810        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9811            flag_type: "MavProtocolCapability",
9812            value: tmp as u32,
9813        })?;
9814        __struct.time_boot_ms = buf.get_u32_le();
9815        __struct.time_manufacture_s = buf.get_u32_le();
9816        for v in &mut __struct.vendor_name {
9817            let val = buf.get_u8();
9818            *v = val;
9819        }
9820        for v in &mut __struct.model_name {
9821            let val = buf.get_u8();
9822            *v = val;
9823        }
9824        for v in &mut __struct.software_version {
9825            let val = buf.get_u8();
9826            *v = val;
9827        }
9828        for v in &mut __struct.hardware_version {
9829            let val = buf.get_u8();
9830            *v = val;
9831        }
9832        for v in &mut __struct.serial_number {
9833            let val = buf.get_u8();
9834            *v = val;
9835        }
9836        Ok(__struct)
9837    }
9838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9839        let mut __tmp = BytesMut::new(bytes);
9840        #[allow(clippy::absurd_extreme_comparisons)]
9841        #[allow(unused_comparisons)]
9842        if __tmp.remaining() < Self::ENCODED_LEN {
9843            panic!(
9844                "buffer is too small (need {} bytes, but got {})",
9845                Self::ENCODED_LEN,
9846                __tmp.remaining(),
9847            )
9848        }
9849        __tmp.put_u64_le(self.capabilities.bits());
9850        __tmp.put_u32_le(self.time_boot_ms);
9851        __tmp.put_u32_le(self.time_manufacture_s);
9852        for val in &self.vendor_name {
9853            __tmp.put_u8(*val);
9854        }
9855        for val in &self.model_name {
9856            __tmp.put_u8(*val);
9857        }
9858        for val in &self.software_version {
9859            __tmp.put_u8(*val);
9860        }
9861        for val in &self.hardware_version {
9862            __tmp.put_u8(*val);
9863        }
9864        for val in &self.serial_number {
9865            __tmp.put_u8(*val);
9866        }
9867        if matches!(version, MavlinkVersion::V2) {
9868            let len = __tmp.len();
9869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9870        } else {
9871            __tmp.len()
9872        }
9873    }
9874}
9875#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9876#[doc = ""]
9877#[doc = "ID: 397"]
9878#[derive(Debug, Clone, PartialEq)]
9879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9881#[cfg_attr(feature = "ts", derive(TS))]
9882#[cfg_attr(feature = "ts", ts(export))]
9883pub struct COMPONENT_METADATA_DATA {
9884    #[doc = "Timestamp (time since system boot)."]
9885    pub time_boot_ms: u32,
9886    #[doc = "CRC32 of the general metadata file."]
9887    pub file_crc: u32,
9888    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9890    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9891    pub uri: [u8; 100],
9892}
9893impl COMPONENT_METADATA_DATA {
9894    pub const ENCODED_LEN: usize = 108usize;
9895    pub const DEFAULT: Self = Self {
9896        time_boot_ms: 0_u32,
9897        file_crc: 0_u32,
9898        uri: [0_u8; 100usize],
9899    };
9900    #[cfg(feature = "arbitrary")]
9901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9902        use arbitrary::{Arbitrary, Unstructured};
9903        let mut buf = [0u8; 1024];
9904        rng.fill_bytes(&mut buf);
9905        let mut unstructured = Unstructured::new(&buf);
9906        Self::arbitrary(&mut unstructured).unwrap_or_default()
9907    }
9908}
9909impl Default for COMPONENT_METADATA_DATA {
9910    fn default() -> Self {
9911        Self::DEFAULT.clone()
9912    }
9913}
9914impl MessageData for COMPONENT_METADATA_DATA {
9915    type Message = MavMessage;
9916    const ID: u32 = 397u32;
9917    const NAME: &'static str = "COMPONENT_METADATA";
9918    const EXTRA_CRC: u8 = 182u8;
9919    const ENCODED_LEN: usize = 108usize;
9920    fn deser(
9921        _version: MavlinkVersion,
9922        __input: &[u8],
9923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9924        let avail_len = __input.len();
9925        let mut payload_buf = [0; Self::ENCODED_LEN];
9926        let mut buf = if avail_len < Self::ENCODED_LEN {
9927            payload_buf[0..avail_len].copy_from_slice(__input);
9928            Bytes::new(&payload_buf)
9929        } else {
9930            Bytes::new(__input)
9931        };
9932        let mut __struct = Self::default();
9933        __struct.time_boot_ms = buf.get_u32_le();
9934        __struct.file_crc = buf.get_u32_le();
9935        for v in &mut __struct.uri {
9936            let val = buf.get_u8();
9937            *v = val;
9938        }
9939        Ok(__struct)
9940    }
9941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9942        let mut __tmp = BytesMut::new(bytes);
9943        #[allow(clippy::absurd_extreme_comparisons)]
9944        #[allow(unused_comparisons)]
9945        if __tmp.remaining() < Self::ENCODED_LEN {
9946            panic!(
9947                "buffer is too small (need {} bytes, but got {})",
9948                Self::ENCODED_LEN,
9949                __tmp.remaining(),
9950            )
9951        }
9952        __tmp.put_u32_le(self.time_boot_ms);
9953        __tmp.put_u32_le(self.file_crc);
9954        for val in &self.uri {
9955            __tmp.put_u8(*val);
9956        }
9957        if matches!(version, MavlinkVersion::V2) {
9958            let len = __tmp.len();
9959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9960        } else {
9961            __tmp.len()
9962        }
9963    }
9964}
9965#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9966#[doc = ""]
9967#[doc = "ID: 146"]
9968#[derive(Debug, Clone, PartialEq)]
9969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9971#[cfg_attr(feature = "ts", derive(TS))]
9972#[cfg_attr(feature = "ts", ts(export))]
9973pub struct CONTROL_SYSTEM_STATE_DATA {
9974    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9975    pub time_usec: u64,
9976    #[doc = "X acceleration in body frame"]
9977    pub x_acc: f32,
9978    #[doc = "Y acceleration in body frame"]
9979    pub y_acc: f32,
9980    #[doc = "Z acceleration in body frame"]
9981    pub z_acc: f32,
9982    #[doc = "X velocity in body frame"]
9983    pub x_vel: f32,
9984    #[doc = "Y velocity in body frame"]
9985    pub y_vel: f32,
9986    #[doc = "Z velocity in body frame"]
9987    pub z_vel: f32,
9988    #[doc = "X position in local frame"]
9989    pub x_pos: f32,
9990    #[doc = "Y position in local frame"]
9991    pub y_pos: f32,
9992    #[doc = "Z position in local frame"]
9993    pub z_pos: f32,
9994    #[doc = "Airspeed, set to -1 if unknown"]
9995    pub airspeed: f32,
9996    #[doc = "Variance of body velocity estimate"]
9997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9998    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9999    pub vel_variance: [f32; 3],
10000    #[doc = "Variance in local position"]
10001    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10002    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10003    pub pos_variance: [f32; 3],
10004    #[doc = "The attitude, represented as Quaternion"]
10005    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10006    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10007    pub q: [f32; 4],
10008    #[doc = "Angular rate in roll axis"]
10009    pub roll_rate: f32,
10010    #[doc = "Angular rate in pitch axis"]
10011    pub pitch_rate: f32,
10012    #[doc = "Angular rate in yaw axis"]
10013    pub yaw_rate: f32,
10014}
10015impl CONTROL_SYSTEM_STATE_DATA {
10016    pub const ENCODED_LEN: usize = 100usize;
10017    pub const DEFAULT: Self = Self {
10018        time_usec: 0_u64,
10019        x_acc: 0.0_f32,
10020        y_acc: 0.0_f32,
10021        z_acc: 0.0_f32,
10022        x_vel: 0.0_f32,
10023        y_vel: 0.0_f32,
10024        z_vel: 0.0_f32,
10025        x_pos: 0.0_f32,
10026        y_pos: 0.0_f32,
10027        z_pos: 0.0_f32,
10028        airspeed: 0.0_f32,
10029        vel_variance: [0.0_f32; 3usize],
10030        pos_variance: [0.0_f32; 3usize],
10031        q: [0.0_f32; 4usize],
10032        roll_rate: 0.0_f32,
10033        pitch_rate: 0.0_f32,
10034        yaw_rate: 0.0_f32,
10035    };
10036    #[cfg(feature = "arbitrary")]
10037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10038        use arbitrary::{Arbitrary, Unstructured};
10039        let mut buf = [0u8; 1024];
10040        rng.fill_bytes(&mut buf);
10041        let mut unstructured = Unstructured::new(&buf);
10042        Self::arbitrary(&mut unstructured).unwrap_or_default()
10043    }
10044}
10045impl Default for CONTROL_SYSTEM_STATE_DATA {
10046    fn default() -> Self {
10047        Self::DEFAULT.clone()
10048    }
10049}
10050impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10051    type Message = MavMessage;
10052    const ID: u32 = 146u32;
10053    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10054    const EXTRA_CRC: u8 = 103u8;
10055    const ENCODED_LEN: usize = 100usize;
10056    fn deser(
10057        _version: MavlinkVersion,
10058        __input: &[u8],
10059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10060        let avail_len = __input.len();
10061        let mut payload_buf = [0; Self::ENCODED_LEN];
10062        let mut buf = if avail_len < Self::ENCODED_LEN {
10063            payload_buf[0..avail_len].copy_from_slice(__input);
10064            Bytes::new(&payload_buf)
10065        } else {
10066            Bytes::new(__input)
10067        };
10068        let mut __struct = Self::default();
10069        __struct.time_usec = buf.get_u64_le();
10070        __struct.x_acc = buf.get_f32_le();
10071        __struct.y_acc = buf.get_f32_le();
10072        __struct.z_acc = buf.get_f32_le();
10073        __struct.x_vel = buf.get_f32_le();
10074        __struct.y_vel = buf.get_f32_le();
10075        __struct.z_vel = buf.get_f32_le();
10076        __struct.x_pos = buf.get_f32_le();
10077        __struct.y_pos = buf.get_f32_le();
10078        __struct.z_pos = buf.get_f32_le();
10079        __struct.airspeed = buf.get_f32_le();
10080        for v in &mut __struct.vel_variance {
10081            let val = buf.get_f32_le();
10082            *v = val;
10083        }
10084        for v in &mut __struct.pos_variance {
10085            let val = buf.get_f32_le();
10086            *v = val;
10087        }
10088        for v in &mut __struct.q {
10089            let val = buf.get_f32_le();
10090            *v = val;
10091        }
10092        __struct.roll_rate = buf.get_f32_le();
10093        __struct.pitch_rate = buf.get_f32_le();
10094        __struct.yaw_rate = buf.get_f32_le();
10095        Ok(__struct)
10096    }
10097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10098        let mut __tmp = BytesMut::new(bytes);
10099        #[allow(clippy::absurd_extreme_comparisons)]
10100        #[allow(unused_comparisons)]
10101        if __tmp.remaining() < Self::ENCODED_LEN {
10102            panic!(
10103                "buffer is too small (need {} bytes, but got {})",
10104                Self::ENCODED_LEN,
10105                __tmp.remaining(),
10106            )
10107        }
10108        __tmp.put_u64_le(self.time_usec);
10109        __tmp.put_f32_le(self.x_acc);
10110        __tmp.put_f32_le(self.y_acc);
10111        __tmp.put_f32_le(self.z_acc);
10112        __tmp.put_f32_le(self.x_vel);
10113        __tmp.put_f32_le(self.y_vel);
10114        __tmp.put_f32_le(self.z_vel);
10115        __tmp.put_f32_le(self.x_pos);
10116        __tmp.put_f32_le(self.y_pos);
10117        __tmp.put_f32_le(self.z_pos);
10118        __tmp.put_f32_le(self.airspeed);
10119        for val in &self.vel_variance {
10120            __tmp.put_f32_le(*val);
10121        }
10122        for val in &self.pos_variance {
10123            __tmp.put_f32_le(*val);
10124        }
10125        for val in &self.q {
10126            __tmp.put_f32_le(*val);
10127        }
10128        __tmp.put_f32_le(self.roll_rate);
10129        __tmp.put_f32_le(self.pitch_rate);
10130        __tmp.put_f32_le(self.yaw_rate);
10131        if matches!(version, MavlinkVersion::V2) {
10132            let len = __tmp.len();
10133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10134        } else {
10135            __tmp.len()
10136        }
10137    }
10138}
10139#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10140#[doc = ""]
10141#[doc = "ID: 411"]
10142#[derive(Debug, Clone, PartialEq)]
10143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10145#[cfg_attr(feature = "ts", derive(TS))]
10146#[cfg_attr(feature = "ts", ts(export))]
10147pub struct CURRENT_EVENT_SEQUENCE_DATA {
10148    #[doc = "Sequence number."]
10149    pub sequence: u16,
10150    #[doc = "Flag bitset."]
10151    pub flags: MavEventCurrentSequenceFlags,
10152}
10153impl CURRENT_EVENT_SEQUENCE_DATA {
10154    pub const ENCODED_LEN: usize = 3usize;
10155    pub const DEFAULT: Self = Self {
10156        sequence: 0_u16,
10157        flags: MavEventCurrentSequenceFlags::DEFAULT,
10158    };
10159    #[cfg(feature = "arbitrary")]
10160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10161        use arbitrary::{Arbitrary, Unstructured};
10162        let mut buf = [0u8; 1024];
10163        rng.fill_bytes(&mut buf);
10164        let mut unstructured = Unstructured::new(&buf);
10165        Self::arbitrary(&mut unstructured).unwrap_or_default()
10166    }
10167}
10168impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10169    fn default() -> Self {
10170        Self::DEFAULT.clone()
10171    }
10172}
10173impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10174    type Message = MavMessage;
10175    const ID: u32 = 411u32;
10176    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10177    const EXTRA_CRC: u8 = 106u8;
10178    const ENCODED_LEN: usize = 3usize;
10179    fn deser(
10180        _version: MavlinkVersion,
10181        __input: &[u8],
10182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10183        let avail_len = __input.len();
10184        let mut payload_buf = [0; Self::ENCODED_LEN];
10185        let mut buf = if avail_len < Self::ENCODED_LEN {
10186            payload_buf[0..avail_len].copy_from_slice(__input);
10187            Bytes::new(&payload_buf)
10188        } else {
10189            Bytes::new(__input)
10190        };
10191        let mut __struct = Self::default();
10192        __struct.sequence = buf.get_u16_le();
10193        let tmp = buf.get_u8();
10194        __struct.flags =
10195            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10196                enum_type: "MavEventCurrentSequenceFlags",
10197                value: tmp as u32,
10198            })?;
10199        Ok(__struct)
10200    }
10201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10202        let mut __tmp = BytesMut::new(bytes);
10203        #[allow(clippy::absurd_extreme_comparisons)]
10204        #[allow(unused_comparisons)]
10205        if __tmp.remaining() < Self::ENCODED_LEN {
10206            panic!(
10207                "buffer is too small (need {} bytes, but got {})",
10208                Self::ENCODED_LEN,
10209                __tmp.remaining(),
10210            )
10211        }
10212        __tmp.put_u16_le(self.sequence);
10213        __tmp.put_u8(self.flags as u8);
10214        if matches!(version, MavlinkVersion::V2) {
10215            let len = __tmp.len();
10216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10217        } else {
10218            __tmp.len()
10219        }
10220    }
10221}
10222#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10223#[doc = ""]
10224#[doc = "ID: 436"]
10225#[derive(Debug, Clone, PartialEq)]
10226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10228#[cfg_attr(feature = "ts", derive(TS))]
10229#[cfg_attr(feature = "ts", ts(export))]
10230pub struct CURRENT_MODE_DATA {
10231    #[doc = "A bitfield for use for autopilot-specific flags"]
10232    pub custom_mode: u32,
10233    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10234    pub intended_custom_mode: u32,
10235    #[doc = "Standard mode."]
10236    pub standard_mode: MavStandardMode,
10237}
10238impl CURRENT_MODE_DATA {
10239    pub const ENCODED_LEN: usize = 9usize;
10240    pub const DEFAULT: Self = Self {
10241        custom_mode: 0_u32,
10242        intended_custom_mode: 0_u32,
10243        standard_mode: MavStandardMode::DEFAULT,
10244    };
10245    #[cfg(feature = "arbitrary")]
10246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10247        use arbitrary::{Arbitrary, Unstructured};
10248        let mut buf = [0u8; 1024];
10249        rng.fill_bytes(&mut buf);
10250        let mut unstructured = Unstructured::new(&buf);
10251        Self::arbitrary(&mut unstructured).unwrap_or_default()
10252    }
10253}
10254impl Default for CURRENT_MODE_DATA {
10255    fn default() -> Self {
10256        Self::DEFAULT.clone()
10257    }
10258}
10259impl MessageData for CURRENT_MODE_DATA {
10260    type Message = MavMessage;
10261    const ID: u32 = 436u32;
10262    const NAME: &'static str = "CURRENT_MODE";
10263    const EXTRA_CRC: u8 = 193u8;
10264    const ENCODED_LEN: usize = 9usize;
10265    fn deser(
10266        _version: MavlinkVersion,
10267        __input: &[u8],
10268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10269        let avail_len = __input.len();
10270        let mut payload_buf = [0; Self::ENCODED_LEN];
10271        let mut buf = if avail_len < Self::ENCODED_LEN {
10272            payload_buf[0..avail_len].copy_from_slice(__input);
10273            Bytes::new(&payload_buf)
10274        } else {
10275            Bytes::new(__input)
10276        };
10277        let mut __struct = Self::default();
10278        __struct.custom_mode = buf.get_u32_le();
10279        __struct.intended_custom_mode = buf.get_u32_le();
10280        let tmp = buf.get_u8();
10281        __struct.standard_mode =
10282            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10283                enum_type: "MavStandardMode",
10284                value: tmp as u32,
10285            })?;
10286        Ok(__struct)
10287    }
10288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10289        let mut __tmp = BytesMut::new(bytes);
10290        #[allow(clippy::absurd_extreme_comparisons)]
10291        #[allow(unused_comparisons)]
10292        if __tmp.remaining() < Self::ENCODED_LEN {
10293            panic!(
10294                "buffer is too small (need {} bytes, but got {})",
10295                Self::ENCODED_LEN,
10296                __tmp.remaining(),
10297            )
10298        }
10299        __tmp.put_u32_le(self.custom_mode);
10300        __tmp.put_u32_le(self.intended_custom_mode);
10301        __tmp.put_u8(self.standard_mode as u8);
10302        if matches!(version, MavlinkVersion::V2) {
10303            let len = __tmp.len();
10304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10305        } else {
10306            __tmp.len()
10307        }
10308    }
10309}
10310#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10311#[doc = "Data stream status information."]
10312#[doc = ""]
10313#[doc = "ID: 67"]
10314#[derive(Debug, Clone, PartialEq)]
10315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10317#[cfg_attr(feature = "ts", derive(TS))]
10318#[cfg_attr(feature = "ts", ts(export))]
10319pub struct DATA_STREAM_DATA {
10320    #[doc = "The message rate"]
10321    pub message_rate: u16,
10322    #[doc = "The ID of the requested data stream"]
10323    pub stream_id: u8,
10324    #[doc = "1 stream is enabled, 0 stream is stopped."]
10325    pub on_off: u8,
10326}
10327impl DATA_STREAM_DATA {
10328    pub const ENCODED_LEN: usize = 4usize;
10329    pub const DEFAULT: Self = Self {
10330        message_rate: 0_u16,
10331        stream_id: 0_u8,
10332        on_off: 0_u8,
10333    };
10334    #[cfg(feature = "arbitrary")]
10335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10336        use arbitrary::{Arbitrary, Unstructured};
10337        let mut buf = [0u8; 1024];
10338        rng.fill_bytes(&mut buf);
10339        let mut unstructured = Unstructured::new(&buf);
10340        Self::arbitrary(&mut unstructured).unwrap_or_default()
10341    }
10342}
10343impl Default for DATA_STREAM_DATA {
10344    fn default() -> Self {
10345        Self::DEFAULT.clone()
10346    }
10347}
10348impl MessageData for DATA_STREAM_DATA {
10349    type Message = MavMessage;
10350    const ID: u32 = 67u32;
10351    const NAME: &'static str = "DATA_STREAM";
10352    const EXTRA_CRC: u8 = 21u8;
10353    const ENCODED_LEN: usize = 4usize;
10354    fn deser(
10355        _version: MavlinkVersion,
10356        __input: &[u8],
10357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10358        let avail_len = __input.len();
10359        let mut payload_buf = [0; Self::ENCODED_LEN];
10360        let mut buf = if avail_len < Self::ENCODED_LEN {
10361            payload_buf[0..avail_len].copy_from_slice(__input);
10362            Bytes::new(&payload_buf)
10363        } else {
10364            Bytes::new(__input)
10365        };
10366        let mut __struct = Self::default();
10367        __struct.message_rate = buf.get_u16_le();
10368        __struct.stream_id = buf.get_u8();
10369        __struct.on_off = buf.get_u8();
10370        Ok(__struct)
10371    }
10372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10373        let mut __tmp = BytesMut::new(bytes);
10374        #[allow(clippy::absurd_extreme_comparisons)]
10375        #[allow(unused_comparisons)]
10376        if __tmp.remaining() < Self::ENCODED_LEN {
10377            panic!(
10378                "buffer is too small (need {} bytes, but got {})",
10379                Self::ENCODED_LEN,
10380                __tmp.remaining(),
10381            )
10382        }
10383        __tmp.put_u16_le(self.message_rate);
10384        __tmp.put_u8(self.stream_id);
10385        __tmp.put_u8(self.on_off);
10386        if matches!(version, MavlinkVersion::V2) {
10387            let len = __tmp.len();
10388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10389        } else {
10390            __tmp.len()
10391        }
10392    }
10393}
10394#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10395#[doc = ""]
10396#[doc = "ID: 130"]
10397#[derive(Debug, Clone, PartialEq)]
10398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10400#[cfg_attr(feature = "ts", derive(TS))]
10401#[cfg_attr(feature = "ts", ts(export))]
10402pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10403    #[doc = "total data size (set on ACK only)."]
10404    pub size: u32,
10405    #[doc = "Width of a matrix or image."]
10406    pub width: u16,
10407    #[doc = "Height of a matrix or image."]
10408    pub height: u16,
10409    #[doc = "Number of packets being sent (set on ACK only)."]
10410    pub packets: u16,
10411    #[doc = "Type of requested/acknowledged data."]
10412    pub mavtype: MavlinkDataStreamType,
10413    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10414    pub payload: u8,
10415    #[doc = "JPEG quality. Values: [1-100]."]
10416    pub jpg_quality: u8,
10417}
10418impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10419    pub const ENCODED_LEN: usize = 13usize;
10420    pub const DEFAULT: Self = Self {
10421        size: 0_u32,
10422        width: 0_u16,
10423        height: 0_u16,
10424        packets: 0_u16,
10425        mavtype: MavlinkDataStreamType::DEFAULT,
10426        payload: 0_u8,
10427        jpg_quality: 0_u8,
10428    };
10429    #[cfg(feature = "arbitrary")]
10430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10431        use arbitrary::{Arbitrary, Unstructured};
10432        let mut buf = [0u8; 1024];
10433        rng.fill_bytes(&mut buf);
10434        let mut unstructured = Unstructured::new(&buf);
10435        Self::arbitrary(&mut unstructured).unwrap_or_default()
10436    }
10437}
10438impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10439    fn default() -> Self {
10440        Self::DEFAULT.clone()
10441    }
10442}
10443impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10444    type Message = MavMessage;
10445    const ID: u32 = 130u32;
10446    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10447    const EXTRA_CRC: u8 = 29u8;
10448    const ENCODED_LEN: usize = 13usize;
10449    fn deser(
10450        _version: MavlinkVersion,
10451        __input: &[u8],
10452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10453        let avail_len = __input.len();
10454        let mut payload_buf = [0; Self::ENCODED_LEN];
10455        let mut buf = if avail_len < Self::ENCODED_LEN {
10456            payload_buf[0..avail_len].copy_from_slice(__input);
10457            Bytes::new(&payload_buf)
10458        } else {
10459            Bytes::new(__input)
10460        };
10461        let mut __struct = Self::default();
10462        __struct.size = buf.get_u32_le();
10463        __struct.width = buf.get_u16_le();
10464        __struct.height = buf.get_u16_le();
10465        __struct.packets = buf.get_u16_le();
10466        let tmp = buf.get_u8();
10467        __struct.mavtype =
10468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10469                enum_type: "MavlinkDataStreamType",
10470                value: tmp as u32,
10471            })?;
10472        __struct.payload = buf.get_u8();
10473        __struct.jpg_quality = buf.get_u8();
10474        Ok(__struct)
10475    }
10476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10477        let mut __tmp = BytesMut::new(bytes);
10478        #[allow(clippy::absurd_extreme_comparisons)]
10479        #[allow(unused_comparisons)]
10480        if __tmp.remaining() < Self::ENCODED_LEN {
10481            panic!(
10482                "buffer is too small (need {} bytes, but got {})",
10483                Self::ENCODED_LEN,
10484                __tmp.remaining(),
10485            )
10486        }
10487        __tmp.put_u32_le(self.size);
10488        __tmp.put_u16_le(self.width);
10489        __tmp.put_u16_le(self.height);
10490        __tmp.put_u16_le(self.packets);
10491        __tmp.put_u8(self.mavtype as u8);
10492        __tmp.put_u8(self.payload);
10493        __tmp.put_u8(self.jpg_quality);
10494        if matches!(version, MavlinkVersion::V2) {
10495            let len = __tmp.len();
10496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10497        } else {
10498            __tmp.len()
10499        }
10500    }
10501}
10502#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10503#[doc = ""]
10504#[doc = "ID: 254"]
10505#[derive(Debug, Clone, PartialEq)]
10506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10508#[cfg_attr(feature = "ts", derive(TS))]
10509#[cfg_attr(feature = "ts", ts(export))]
10510pub struct DEBUG_DATA {
10511    #[doc = "Timestamp (time since system boot)."]
10512    pub time_boot_ms: u32,
10513    #[doc = "DEBUG value"]
10514    pub value: f32,
10515    #[doc = "index of debug variable"]
10516    pub ind: u8,
10517}
10518impl DEBUG_DATA {
10519    pub const ENCODED_LEN: usize = 9usize;
10520    pub const DEFAULT: Self = Self {
10521        time_boot_ms: 0_u32,
10522        value: 0.0_f32,
10523        ind: 0_u8,
10524    };
10525    #[cfg(feature = "arbitrary")]
10526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10527        use arbitrary::{Arbitrary, Unstructured};
10528        let mut buf = [0u8; 1024];
10529        rng.fill_bytes(&mut buf);
10530        let mut unstructured = Unstructured::new(&buf);
10531        Self::arbitrary(&mut unstructured).unwrap_or_default()
10532    }
10533}
10534impl Default for DEBUG_DATA {
10535    fn default() -> Self {
10536        Self::DEFAULT.clone()
10537    }
10538}
10539impl MessageData for DEBUG_DATA {
10540    type Message = MavMessage;
10541    const ID: u32 = 254u32;
10542    const NAME: &'static str = "DEBUG";
10543    const EXTRA_CRC: u8 = 46u8;
10544    const ENCODED_LEN: usize = 9usize;
10545    fn deser(
10546        _version: MavlinkVersion,
10547        __input: &[u8],
10548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10549        let avail_len = __input.len();
10550        let mut payload_buf = [0; Self::ENCODED_LEN];
10551        let mut buf = if avail_len < Self::ENCODED_LEN {
10552            payload_buf[0..avail_len].copy_from_slice(__input);
10553            Bytes::new(&payload_buf)
10554        } else {
10555            Bytes::new(__input)
10556        };
10557        let mut __struct = Self::default();
10558        __struct.time_boot_ms = buf.get_u32_le();
10559        __struct.value = buf.get_f32_le();
10560        __struct.ind = buf.get_u8();
10561        Ok(__struct)
10562    }
10563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10564        let mut __tmp = BytesMut::new(bytes);
10565        #[allow(clippy::absurd_extreme_comparisons)]
10566        #[allow(unused_comparisons)]
10567        if __tmp.remaining() < Self::ENCODED_LEN {
10568            panic!(
10569                "buffer is too small (need {} bytes, but got {})",
10570                Self::ENCODED_LEN,
10571                __tmp.remaining(),
10572            )
10573        }
10574        __tmp.put_u32_le(self.time_boot_ms);
10575        __tmp.put_f32_le(self.value);
10576        __tmp.put_u8(self.ind);
10577        if matches!(version, MavlinkVersion::V2) {
10578            let len = __tmp.len();
10579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10580        } else {
10581            __tmp.len()
10582        }
10583    }
10584}
10585#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10586#[doc = ""]
10587#[doc = "ID: 350"]
10588#[derive(Debug, Clone, PartialEq)]
10589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10591#[cfg_attr(feature = "ts", derive(TS))]
10592#[cfg_attr(feature = "ts", ts(export))]
10593pub struct DEBUG_FLOAT_ARRAY_DATA {
10594    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10595    pub time_usec: u64,
10596    #[doc = "Unique ID used to discriminate between arrays"]
10597    pub array_id: u16,
10598    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10600    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10601    pub name: [u8; 10],
10602    #[doc = "data"]
10603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10604    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10605    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10606    pub data: [f32; 58],
10607}
10608impl DEBUG_FLOAT_ARRAY_DATA {
10609    pub const ENCODED_LEN: usize = 252usize;
10610    pub const DEFAULT: Self = Self {
10611        time_usec: 0_u64,
10612        array_id: 0_u16,
10613        name: [0_u8; 10usize],
10614        data: [0.0_f32; 58usize],
10615    };
10616    #[cfg(feature = "arbitrary")]
10617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10618        use arbitrary::{Arbitrary, Unstructured};
10619        let mut buf = [0u8; 1024];
10620        rng.fill_bytes(&mut buf);
10621        let mut unstructured = Unstructured::new(&buf);
10622        Self::arbitrary(&mut unstructured).unwrap_or_default()
10623    }
10624}
10625impl Default for DEBUG_FLOAT_ARRAY_DATA {
10626    fn default() -> Self {
10627        Self::DEFAULT.clone()
10628    }
10629}
10630impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10631    type Message = MavMessage;
10632    const ID: u32 = 350u32;
10633    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10634    const EXTRA_CRC: u8 = 232u8;
10635    const ENCODED_LEN: usize = 252usize;
10636    fn deser(
10637        _version: MavlinkVersion,
10638        __input: &[u8],
10639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10640        let avail_len = __input.len();
10641        let mut payload_buf = [0; Self::ENCODED_LEN];
10642        let mut buf = if avail_len < Self::ENCODED_LEN {
10643            payload_buf[0..avail_len].copy_from_slice(__input);
10644            Bytes::new(&payload_buf)
10645        } else {
10646            Bytes::new(__input)
10647        };
10648        let mut __struct = Self::default();
10649        __struct.time_usec = buf.get_u64_le();
10650        __struct.array_id = buf.get_u16_le();
10651        for v in &mut __struct.name {
10652            let val = buf.get_u8();
10653            *v = val;
10654        }
10655        for v in &mut __struct.data {
10656            let val = buf.get_f32_le();
10657            *v = val;
10658        }
10659        Ok(__struct)
10660    }
10661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10662        let mut __tmp = BytesMut::new(bytes);
10663        #[allow(clippy::absurd_extreme_comparisons)]
10664        #[allow(unused_comparisons)]
10665        if __tmp.remaining() < Self::ENCODED_LEN {
10666            panic!(
10667                "buffer is too small (need {} bytes, but got {})",
10668                Self::ENCODED_LEN,
10669                __tmp.remaining(),
10670            )
10671        }
10672        __tmp.put_u64_le(self.time_usec);
10673        __tmp.put_u16_le(self.array_id);
10674        for val in &self.name {
10675            __tmp.put_u8(*val);
10676        }
10677        if matches!(version, MavlinkVersion::V2) {
10678            for val in &self.data {
10679                __tmp.put_f32_le(*val);
10680            }
10681            let len = __tmp.len();
10682            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10683        } else {
10684            __tmp.len()
10685        }
10686    }
10687}
10688#[doc = "To debug something using a named 3D vector."]
10689#[doc = ""]
10690#[doc = "ID: 250"]
10691#[derive(Debug, Clone, PartialEq)]
10692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10693#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10694#[cfg_attr(feature = "ts", derive(TS))]
10695#[cfg_attr(feature = "ts", ts(export))]
10696pub struct DEBUG_VECT_DATA {
10697    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10698    pub time_usec: u64,
10699    #[doc = "x"]
10700    pub x: f32,
10701    #[doc = "y"]
10702    pub y: f32,
10703    #[doc = "z"]
10704    pub z: f32,
10705    #[doc = "Name"]
10706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10708    pub name: [u8; 10],
10709}
10710impl DEBUG_VECT_DATA {
10711    pub const ENCODED_LEN: usize = 30usize;
10712    pub const DEFAULT: Self = Self {
10713        time_usec: 0_u64,
10714        x: 0.0_f32,
10715        y: 0.0_f32,
10716        z: 0.0_f32,
10717        name: [0_u8; 10usize],
10718    };
10719    #[cfg(feature = "arbitrary")]
10720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10721        use arbitrary::{Arbitrary, Unstructured};
10722        let mut buf = [0u8; 1024];
10723        rng.fill_bytes(&mut buf);
10724        let mut unstructured = Unstructured::new(&buf);
10725        Self::arbitrary(&mut unstructured).unwrap_or_default()
10726    }
10727}
10728impl Default for DEBUG_VECT_DATA {
10729    fn default() -> Self {
10730        Self::DEFAULT.clone()
10731    }
10732}
10733impl MessageData for DEBUG_VECT_DATA {
10734    type Message = MavMessage;
10735    const ID: u32 = 250u32;
10736    const NAME: &'static str = "DEBUG_VECT";
10737    const EXTRA_CRC: u8 = 49u8;
10738    const ENCODED_LEN: usize = 30usize;
10739    fn deser(
10740        _version: MavlinkVersion,
10741        __input: &[u8],
10742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10743        let avail_len = __input.len();
10744        let mut payload_buf = [0; Self::ENCODED_LEN];
10745        let mut buf = if avail_len < Self::ENCODED_LEN {
10746            payload_buf[0..avail_len].copy_from_slice(__input);
10747            Bytes::new(&payload_buf)
10748        } else {
10749            Bytes::new(__input)
10750        };
10751        let mut __struct = Self::default();
10752        __struct.time_usec = buf.get_u64_le();
10753        __struct.x = buf.get_f32_le();
10754        __struct.y = buf.get_f32_le();
10755        __struct.z = buf.get_f32_le();
10756        for v in &mut __struct.name {
10757            let val = buf.get_u8();
10758            *v = val;
10759        }
10760        Ok(__struct)
10761    }
10762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10763        let mut __tmp = BytesMut::new(bytes);
10764        #[allow(clippy::absurd_extreme_comparisons)]
10765        #[allow(unused_comparisons)]
10766        if __tmp.remaining() < Self::ENCODED_LEN {
10767            panic!(
10768                "buffer is too small (need {} bytes, but got {})",
10769                Self::ENCODED_LEN,
10770                __tmp.remaining(),
10771            )
10772        }
10773        __tmp.put_u64_le(self.time_usec);
10774        __tmp.put_f32_le(self.x);
10775        __tmp.put_f32_le(self.y);
10776        __tmp.put_f32_le(self.z);
10777        for val in &self.name {
10778            __tmp.put_u8(*val);
10779        }
10780        if matches!(version, MavlinkVersion::V2) {
10781            let len = __tmp.len();
10782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10783        } else {
10784            __tmp.len()
10785        }
10786    }
10787}
10788#[doc = "Distance sensor information for an onboard rangefinder."]
10789#[doc = ""]
10790#[doc = "ID: 132"]
10791#[derive(Debug, Clone, PartialEq)]
10792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10794#[cfg_attr(feature = "ts", derive(TS))]
10795#[cfg_attr(feature = "ts", ts(export))]
10796pub struct DISTANCE_SENSOR_DATA {
10797    #[doc = "Timestamp (time since system boot)."]
10798    pub time_boot_ms: u32,
10799    #[doc = "Minimum distance the sensor can measure"]
10800    pub min_distance: u16,
10801    #[doc = "Maximum distance the sensor can measure"]
10802    pub max_distance: u16,
10803    #[doc = "Current distance reading"]
10804    pub current_distance: u16,
10805    #[doc = "Type of distance sensor."]
10806    pub mavtype: MavDistanceSensor,
10807    #[doc = "Onboard ID of the sensor"]
10808    pub id: u8,
10809    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10810    pub orientation: MavSensorOrientation,
10811    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10812    pub covariance: u8,
10813    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10815    pub horizontal_fov: f32,
10816    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10818    pub vertical_fov: f32,
10819    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10821    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10822    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10823    pub quaternion: [f32; 4],
10824    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10825    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10826    pub signal_quality: u8,
10827}
10828impl DISTANCE_SENSOR_DATA {
10829    pub const ENCODED_LEN: usize = 39usize;
10830    pub const DEFAULT: Self = Self {
10831        time_boot_ms: 0_u32,
10832        min_distance: 0_u16,
10833        max_distance: 0_u16,
10834        current_distance: 0_u16,
10835        mavtype: MavDistanceSensor::DEFAULT,
10836        id: 0_u8,
10837        orientation: MavSensorOrientation::DEFAULT,
10838        covariance: 0_u8,
10839        horizontal_fov: 0.0_f32,
10840        vertical_fov: 0.0_f32,
10841        quaternion: [0.0_f32; 4usize],
10842        signal_quality: 0_u8,
10843    };
10844    #[cfg(feature = "arbitrary")]
10845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10846        use arbitrary::{Arbitrary, Unstructured};
10847        let mut buf = [0u8; 1024];
10848        rng.fill_bytes(&mut buf);
10849        let mut unstructured = Unstructured::new(&buf);
10850        Self::arbitrary(&mut unstructured).unwrap_or_default()
10851    }
10852}
10853impl Default for DISTANCE_SENSOR_DATA {
10854    fn default() -> Self {
10855        Self::DEFAULT.clone()
10856    }
10857}
10858impl MessageData for DISTANCE_SENSOR_DATA {
10859    type Message = MavMessage;
10860    const ID: u32 = 132u32;
10861    const NAME: &'static str = "DISTANCE_SENSOR";
10862    const EXTRA_CRC: u8 = 85u8;
10863    const ENCODED_LEN: usize = 39usize;
10864    fn deser(
10865        _version: MavlinkVersion,
10866        __input: &[u8],
10867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10868        let avail_len = __input.len();
10869        let mut payload_buf = [0; Self::ENCODED_LEN];
10870        let mut buf = if avail_len < Self::ENCODED_LEN {
10871            payload_buf[0..avail_len].copy_from_slice(__input);
10872            Bytes::new(&payload_buf)
10873        } else {
10874            Bytes::new(__input)
10875        };
10876        let mut __struct = Self::default();
10877        __struct.time_boot_ms = buf.get_u32_le();
10878        __struct.min_distance = buf.get_u16_le();
10879        __struct.max_distance = buf.get_u16_le();
10880        __struct.current_distance = buf.get_u16_le();
10881        let tmp = buf.get_u8();
10882        __struct.mavtype =
10883            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10884                enum_type: "MavDistanceSensor",
10885                value: tmp as u32,
10886            })?;
10887        __struct.id = buf.get_u8();
10888        let tmp = buf.get_u8();
10889        __struct.orientation =
10890            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10891                enum_type: "MavSensorOrientation",
10892                value: tmp as u32,
10893            })?;
10894        __struct.covariance = buf.get_u8();
10895        __struct.horizontal_fov = buf.get_f32_le();
10896        __struct.vertical_fov = buf.get_f32_le();
10897        for v in &mut __struct.quaternion {
10898            let val = buf.get_f32_le();
10899            *v = val;
10900        }
10901        __struct.signal_quality = buf.get_u8();
10902        Ok(__struct)
10903    }
10904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10905        let mut __tmp = BytesMut::new(bytes);
10906        #[allow(clippy::absurd_extreme_comparisons)]
10907        #[allow(unused_comparisons)]
10908        if __tmp.remaining() < Self::ENCODED_LEN {
10909            panic!(
10910                "buffer is too small (need {} bytes, but got {})",
10911                Self::ENCODED_LEN,
10912                __tmp.remaining(),
10913            )
10914        }
10915        __tmp.put_u32_le(self.time_boot_ms);
10916        __tmp.put_u16_le(self.min_distance);
10917        __tmp.put_u16_le(self.max_distance);
10918        __tmp.put_u16_le(self.current_distance);
10919        __tmp.put_u8(self.mavtype as u8);
10920        __tmp.put_u8(self.id);
10921        __tmp.put_u8(self.orientation as u8);
10922        __tmp.put_u8(self.covariance);
10923        if matches!(version, MavlinkVersion::V2) {
10924            __tmp.put_f32_le(self.horizontal_fov);
10925            __tmp.put_f32_le(self.vertical_fov);
10926            for val in &self.quaternion {
10927                __tmp.put_f32_le(*val);
10928            }
10929            __tmp.put_u8(self.signal_quality);
10930            let len = __tmp.len();
10931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10932        } else {
10933            __tmp.len()
10934        }
10935    }
10936}
10937#[doc = "EFI status output."]
10938#[doc = ""]
10939#[doc = "ID: 225"]
10940#[derive(Debug, Clone, PartialEq)]
10941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10943#[cfg_attr(feature = "ts", derive(TS))]
10944#[cfg_attr(feature = "ts", ts(export))]
10945pub struct EFI_STATUS_DATA {
10946    #[doc = "ECU index"]
10947    pub ecu_index: f32,
10948    #[doc = "RPM"]
10949    pub rpm: f32,
10950    #[doc = "Fuel consumed"]
10951    pub fuel_consumed: f32,
10952    #[doc = "Fuel flow rate"]
10953    pub fuel_flow: f32,
10954    #[doc = "Engine load"]
10955    pub engine_load: f32,
10956    #[doc = "Throttle position"]
10957    pub throttle_position: f32,
10958    #[doc = "Spark dwell time"]
10959    pub spark_dwell_time: f32,
10960    #[doc = "Barometric pressure"]
10961    pub barometric_pressure: f32,
10962    #[doc = "Intake manifold pressure("]
10963    pub intake_manifold_pressure: f32,
10964    #[doc = "Intake manifold temperature"]
10965    pub intake_manifold_temperature: f32,
10966    #[doc = "Cylinder head temperature"]
10967    pub cylinder_head_temperature: f32,
10968    #[doc = "Ignition timing (Crank angle degrees)"]
10969    pub ignition_timing: f32,
10970    #[doc = "Injection time"]
10971    pub injection_time: f32,
10972    #[doc = "Exhaust gas temperature"]
10973    pub exhaust_gas_temperature: f32,
10974    #[doc = "Output throttle"]
10975    pub throttle_out: f32,
10976    #[doc = "Pressure/temperature compensation"]
10977    pub pt_compensation: f32,
10978    #[doc = "EFI health status"]
10979    pub health: u8,
10980    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10982    pub ignition_voltage: f32,
10983    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10985    pub fuel_pressure: f32,
10986}
10987impl EFI_STATUS_DATA {
10988    pub const ENCODED_LEN: usize = 73usize;
10989    pub const DEFAULT: Self = Self {
10990        ecu_index: 0.0_f32,
10991        rpm: 0.0_f32,
10992        fuel_consumed: 0.0_f32,
10993        fuel_flow: 0.0_f32,
10994        engine_load: 0.0_f32,
10995        throttle_position: 0.0_f32,
10996        spark_dwell_time: 0.0_f32,
10997        barometric_pressure: 0.0_f32,
10998        intake_manifold_pressure: 0.0_f32,
10999        intake_manifold_temperature: 0.0_f32,
11000        cylinder_head_temperature: 0.0_f32,
11001        ignition_timing: 0.0_f32,
11002        injection_time: 0.0_f32,
11003        exhaust_gas_temperature: 0.0_f32,
11004        throttle_out: 0.0_f32,
11005        pt_compensation: 0.0_f32,
11006        health: 0_u8,
11007        ignition_voltage: 0.0_f32,
11008        fuel_pressure: 0.0_f32,
11009    };
11010    #[cfg(feature = "arbitrary")]
11011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11012        use arbitrary::{Arbitrary, Unstructured};
11013        let mut buf = [0u8; 1024];
11014        rng.fill_bytes(&mut buf);
11015        let mut unstructured = Unstructured::new(&buf);
11016        Self::arbitrary(&mut unstructured).unwrap_or_default()
11017    }
11018}
11019impl Default for EFI_STATUS_DATA {
11020    fn default() -> Self {
11021        Self::DEFAULT.clone()
11022    }
11023}
11024impl MessageData for EFI_STATUS_DATA {
11025    type Message = MavMessage;
11026    const ID: u32 = 225u32;
11027    const NAME: &'static str = "EFI_STATUS";
11028    const EXTRA_CRC: u8 = 208u8;
11029    const ENCODED_LEN: usize = 73usize;
11030    fn deser(
11031        _version: MavlinkVersion,
11032        __input: &[u8],
11033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11034        let avail_len = __input.len();
11035        let mut payload_buf = [0; Self::ENCODED_LEN];
11036        let mut buf = if avail_len < Self::ENCODED_LEN {
11037            payload_buf[0..avail_len].copy_from_slice(__input);
11038            Bytes::new(&payload_buf)
11039        } else {
11040            Bytes::new(__input)
11041        };
11042        let mut __struct = Self::default();
11043        __struct.ecu_index = buf.get_f32_le();
11044        __struct.rpm = buf.get_f32_le();
11045        __struct.fuel_consumed = buf.get_f32_le();
11046        __struct.fuel_flow = buf.get_f32_le();
11047        __struct.engine_load = buf.get_f32_le();
11048        __struct.throttle_position = buf.get_f32_le();
11049        __struct.spark_dwell_time = buf.get_f32_le();
11050        __struct.barometric_pressure = buf.get_f32_le();
11051        __struct.intake_manifold_pressure = buf.get_f32_le();
11052        __struct.intake_manifold_temperature = buf.get_f32_le();
11053        __struct.cylinder_head_temperature = buf.get_f32_le();
11054        __struct.ignition_timing = buf.get_f32_le();
11055        __struct.injection_time = buf.get_f32_le();
11056        __struct.exhaust_gas_temperature = buf.get_f32_le();
11057        __struct.throttle_out = buf.get_f32_le();
11058        __struct.pt_compensation = buf.get_f32_le();
11059        __struct.health = buf.get_u8();
11060        __struct.ignition_voltage = buf.get_f32_le();
11061        __struct.fuel_pressure = buf.get_f32_le();
11062        Ok(__struct)
11063    }
11064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11065        let mut __tmp = BytesMut::new(bytes);
11066        #[allow(clippy::absurd_extreme_comparisons)]
11067        #[allow(unused_comparisons)]
11068        if __tmp.remaining() < Self::ENCODED_LEN {
11069            panic!(
11070                "buffer is too small (need {} bytes, but got {})",
11071                Self::ENCODED_LEN,
11072                __tmp.remaining(),
11073            )
11074        }
11075        __tmp.put_f32_le(self.ecu_index);
11076        __tmp.put_f32_le(self.rpm);
11077        __tmp.put_f32_le(self.fuel_consumed);
11078        __tmp.put_f32_le(self.fuel_flow);
11079        __tmp.put_f32_le(self.engine_load);
11080        __tmp.put_f32_le(self.throttle_position);
11081        __tmp.put_f32_le(self.spark_dwell_time);
11082        __tmp.put_f32_le(self.barometric_pressure);
11083        __tmp.put_f32_le(self.intake_manifold_pressure);
11084        __tmp.put_f32_le(self.intake_manifold_temperature);
11085        __tmp.put_f32_le(self.cylinder_head_temperature);
11086        __tmp.put_f32_le(self.ignition_timing);
11087        __tmp.put_f32_le(self.injection_time);
11088        __tmp.put_f32_le(self.exhaust_gas_temperature);
11089        __tmp.put_f32_le(self.throttle_out);
11090        __tmp.put_f32_le(self.pt_compensation);
11091        __tmp.put_u8(self.health);
11092        if matches!(version, MavlinkVersion::V2) {
11093            __tmp.put_f32_le(self.ignition_voltage);
11094            __tmp.put_f32_le(self.fuel_pressure);
11095            let len = __tmp.len();
11096            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11097        } else {
11098            __tmp.len()
11099        }
11100    }
11101}
11102#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11103#[doc = ""]
11104#[doc = "ID: 131"]
11105#[derive(Debug, Clone, PartialEq)]
11106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11108#[cfg_attr(feature = "ts", derive(TS))]
11109#[cfg_attr(feature = "ts", ts(export))]
11110pub struct ENCAPSULATED_DATA_DATA {
11111    #[doc = "sequence number (starting with 0 on every transmission)"]
11112    pub seqnr: u16,
11113    #[doc = "image data bytes"]
11114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11115    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11116    pub data: [u8; 253],
11117}
11118impl ENCAPSULATED_DATA_DATA {
11119    pub const ENCODED_LEN: usize = 255usize;
11120    pub const DEFAULT: Self = Self {
11121        seqnr: 0_u16,
11122        data: [0_u8; 253usize],
11123    };
11124    #[cfg(feature = "arbitrary")]
11125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11126        use arbitrary::{Arbitrary, Unstructured};
11127        let mut buf = [0u8; 1024];
11128        rng.fill_bytes(&mut buf);
11129        let mut unstructured = Unstructured::new(&buf);
11130        Self::arbitrary(&mut unstructured).unwrap_or_default()
11131    }
11132}
11133impl Default for ENCAPSULATED_DATA_DATA {
11134    fn default() -> Self {
11135        Self::DEFAULT.clone()
11136    }
11137}
11138impl MessageData for ENCAPSULATED_DATA_DATA {
11139    type Message = MavMessage;
11140    const ID: u32 = 131u32;
11141    const NAME: &'static str = "ENCAPSULATED_DATA";
11142    const EXTRA_CRC: u8 = 223u8;
11143    const ENCODED_LEN: usize = 255usize;
11144    fn deser(
11145        _version: MavlinkVersion,
11146        __input: &[u8],
11147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11148        let avail_len = __input.len();
11149        let mut payload_buf = [0; Self::ENCODED_LEN];
11150        let mut buf = if avail_len < Self::ENCODED_LEN {
11151            payload_buf[0..avail_len].copy_from_slice(__input);
11152            Bytes::new(&payload_buf)
11153        } else {
11154            Bytes::new(__input)
11155        };
11156        let mut __struct = Self::default();
11157        __struct.seqnr = buf.get_u16_le();
11158        for v in &mut __struct.data {
11159            let val = buf.get_u8();
11160            *v = val;
11161        }
11162        Ok(__struct)
11163    }
11164    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11165        let mut __tmp = BytesMut::new(bytes);
11166        #[allow(clippy::absurd_extreme_comparisons)]
11167        #[allow(unused_comparisons)]
11168        if __tmp.remaining() < Self::ENCODED_LEN {
11169            panic!(
11170                "buffer is too small (need {} bytes, but got {})",
11171                Self::ENCODED_LEN,
11172                __tmp.remaining(),
11173            )
11174        }
11175        __tmp.put_u16_le(self.seqnr);
11176        for val in &self.data {
11177            __tmp.put_u8(*val);
11178        }
11179        if matches!(version, MavlinkVersion::V2) {
11180            let len = __tmp.len();
11181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11182        } else {
11183            __tmp.len()
11184        }
11185    }
11186}
11187#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11188#[doc = ""]
11189#[doc = "ID: 290"]
11190#[derive(Debug, Clone, PartialEq)]
11191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11193#[cfg_attr(feature = "ts", derive(TS))]
11194#[cfg_attr(feature = "ts", ts(export))]
11195pub struct ESC_INFO_DATA {
11196    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11197    pub time_usec: u64,
11198    #[doc = "Number of reported errors by each ESC since boot."]
11199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11200    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11201    pub error_count: [u32; 4],
11202    #[doc = "Counter of data packets received."]
11203    pub counter: u16,
11204    #[doc = "Bitmap of ESC failure flags."]
11205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11207    pub failure_flags: [u16; 4],
11208    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11211    pub temperature: [i16; 4],
11212    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11213    pub index: u8,
11214    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11215    pub count: u8,
11216    #[doc = "Connection type protocol for all ESC."]
11217    pub connection_type: EscConnectionType,
11218    #[doc = "Information regarding online/offline status of each ESC."]
11219    pub info: u8,
11220}
11221impl ESC_INFO_DATA {
11222    pub const ENCODED_LEN: usize = 46usize;
11223    pub const DEFAULT: Self = Self {
11224        time_usec: 0_u64,
11225        error_count: [0_u32; 4usize],
11226        counter: 0_u16,
11227        failure_flags: [0_u16; 4usize],
11228        temperature: [0_i16; 4usize],
11229        index: 0_u8,
11230        count: 0_u8,
11231        connection_type: EscConnectionType::DEFAULT,
11232        info: 0_u8,
11233    };
11234    #[cfg(feature = "arbitrary")]
11235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11236        use arbitrary::{Arbitrary, Unstructured};
11237        let mut buf = [0u8; 1024];
11238        rng.fill_bytes(&mut buf);
11239        let mut unstructured = Unstructured::new(&buf);
11240        Self::arbitrary(&mut unstructured).unwrap_or_default()
11241    }
11242}
11243impl Default for ESC_INFO_DATA {
11244    fn default() -> Self {
11245        Self::DEFAULT.clone()
11246    }
11247}
11248impl MessageData for ESC_INFO_DATA {
11249    type Message = MavMessage;
11250    const ID: u32 = 290u32;
11251    const NAME: &'static str = "ESC_INFO";
11252    const EXTRA_CRC: u8 = 251u8;
11253    const ENCODED_LEN: usize = 46usize;
11254    fn deser(
11255        _version: MavlinkVersion,
11256        __input: &[u8],
11257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11258        let avail_len = __input.len();
11259        let mut payload_buf = [0; Self::ENCODED_LEN];
11260        let mut buf = if avail_len < Self::ENCODED_LEN {
11261            payload_buf[0..avail_len].copy_from_slice(__input);
11262            Bytes::new(&payload_buf)
11263        } else {
11264            Bytes::new(__input)
11265        };
11266        let mut __struct = Self::default();
11267        __struct.time_usec = buf.get_u64_le();
11268        for v in &mut __struct.error_count {
11269            let val = buf.get_u32_le();
11270            *v = val;
11271        }
11272        __struct.counter = buf.get_u16_le();
11273        for v in &mut __struct.failure_flags {
11274            let val = buf.get_u16_le();
11275            *v = val;
11276        }
11277        for v in &mut __struct.temperature {
11278            let val = buf.get_i16_le();
11279            *v = val;
11280        }
11281        __struct.index = buf.get_u8();
11282        __struct.count = buf.get_u8();
11283        let tmp = buf.get_u8();
11284        __struct.connection_type =
11285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11286                enum_type: "EscConnectionType",
11287                value: tmp as u32,
11288            })?;
11289        __struct.info = buf.get_u8();
11290        Ok(__struct)
11291    }
11292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11293        let mut __tmp = BytesMut::new(bytes);
11294        #[allow(clippy::absurd_extreme_comparisons)]
11295        #[allow(unused_comparisons)]
11296        if __tmp.remaining() < Self::ENCODED_LEN {
11297            panic!(
11298                "buffer is too small (need {} bytes, but got {})",
11299                Self::ENCODED_LEN,
11300                __tmp.remaining(),
11301            )
11302        }
11303        __tmp.put_u64_le(self.time_usec);
11304        for val in &self.error_count {
11305            __tmp.put_u32_le(*val);
11306        }
11307        __tmp.put_u16_le(self.counter);
11308        for val in &self.failure_flags {
11309            __tmp.put_u16_le(*val);
11310        }
11311        for val in &self.temperature {
11312            __tmp.put_i16_le(*val);
11313        }
11314        __tmp.put_u8(self.index);
11315        __tmp.put_u8(self.count);
11316        __tmp.put_u8(self.connection_type as u8);
11317        __tmp.put_u8(self.info);
11318        if matches!(version, MavlinkVersion::V2) {
11319            let len = __tmp.len();
11320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11321        } else {
11322            __tmp.len()
11323        }
11324    }
11325}
11326#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11327#[doc = ""]
11328#[doc = "ID: 291"]
11329#[derive(Debug, Clone, PartialEq)]
11330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11332#[cfg_attr(feature = "ts", derive(TS))]
11333#[cfg_attr(feature = "ts", ts(export))]
11334pub struct ESC_STATUS_DATA {
11335    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11336    pub time_usec: u64,
11337    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11340    pub rpm: [i32; 4],
11341    #[doc = "Voltage measured from each ESC."]
11342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11344    pub voltage: [f32; 4],
11345    #[doc = "Current measured from each ESC."]
11346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11347    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11348    pub current: [f32; 4],
11349    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11350    pub index: u8,
11351}
11352impl ESC_STATUS_DATA {
11353    pub const ENCODED_LEN: usize = 57usize;
11354    pub const DEFAULT: Self = Self {
11355        time_usec: 0_u64,
11356        rpm: [0_i32; 4usize],
11357        voltage: [0.0_f32; 4usize],
11358        current: [0.0_f32; 4usize],
11359        index: 0_u8,
11360    };
11361    #[cfg(feature = "arbitrary")]
11362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11363        use arbitrary::{Arbitrary, Unstructured};
11364        let mut buf = [0u8; 1024];
11365        rng.fill_bytes(&mut buf);
11366        let mut unstructured = Unstructured::new(&buf);
11367        Self::arbitrary(&mut unstructured).unwrap_or_default()
11368    }
11369}
11370impl Default for ESC_STATUS_DATA {
11371    fn default() -> Self {
11372        Self::DEFAULT.clone()
11373    }
11374}
11375impl MessageData for ESC_STATUS_DATA {
11376    type Message = MavMessage;
11377    const ID: u32 = 291u32;
11378    const NAME: &'static str = "ESC_STATUS";
11379    const EXTRA_CRC: u8 = 10u8;
11380    const ENCODED_LEN: usize = 57usize;
11381    fn deser(
11382        _version: MavlinkVersion,
11383        __input: &[u8],
11384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11385        let avail_len = __input.len();
11386        let mut payload_buf = [0; Self::ENCODED_LEN];
11387        let mut buf = if avail_len < Self::ENCODED_LEN {
11388            payload_buf[0..avail_len].copy_from_slice(__input);
11389            Bytes::new(&payload_buf)
11390        } else {
11391            Bytes::new(__input)
11392        };
11393        let mut __struct = Self::default();
11394        __struct.time_usec = buf.get_u64_le();
11395        for v in &mut __struct.rpm {
11396            let val = buf.get_i32_le();
11397            *v = val;
11398        }
11399        for v in &mut __struct.voltage {
11400            let val = buf.get_f32_le();
11401            *v = val;
11402        }
11403        for v in &mut __struct.current {
11404            let val = buf.get_f32_le();
11405            *v = val;
11406        }
11407        __struct.index = buf.get_u8();
11408        Ok(__struct)
11409    }
11410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11411        let mut __tmp = BytesMut::new(bytes);
11412        #[allow(clippy::absurd_extreme_comparisons)]
11413        #[allow(unused_comparisons)]
11414        if __tmp.remaining() < Self::ENCODED_LEN {
11415            panic!(
11416                "buffer is too small (need {} bytes, but got {})",
11417                Self::ENCODED_LEN,
11418                __tmp.remaining(),
11419            )
11420        }
11421        __tmp.put_u64_le(self.time_usec);
11422        for val in &self.rpm {
11423            __tmp.put_i32_le(*val);
11424        }
11425        for val in &self.voltage {
11426            __tmp.put_f32_le(*val);
11427        }
11428        for val in &self.current {
11429            __tmp.put_f32_le(*val);
11430        }
11431        __tmp.put_u8(self.index);
11432        if matches!(version, MavlinkVersion::V2) {
11433            let len = __tmp.len();
11434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11435        } else {
11436            __tmp.len()
11437        }
11438    }
11439}
11440#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11441#[doc = ""]
11442#[doc = "ID: 230"]
11443#[derive(Debug, Clone, PartialEq)]
11444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11446#[cfg_attr(feature = "ts", derive(TS))]
11447#[cfg_attr(feature = "ts", ts(export))]
11448pub struct ESTIMATOR_STATUS_DATA {
11449    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11450    pub time_usec: u64,
11451    #[doc = "Velocity innovation test ratio"]
11452    pub vel_ratio: f32,
11453    #[doc = "Horizontal position innovation test ratio"]
11454    pub pos_horiz_ratio: f32,
11455    #[doc = "Vertical position innovation test ratio"]
11456    pub pos_vert_ratio: f32,
11457    #[doc = "Magnetometer innovation test ratio"]
11458    pub mag_ratio: f32,
11459    #[doc = "Height above terrain innovation test ratio"]
11460    pub hagl_ratio: f32,
11461    #[doc = "True airspeed innovation test ratio"]
11462    pub tas_ratio: f32,
11463    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11464    pub pos_horiz_accuracy: f32,
11465    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11466    pub pos_vert_accuracy: f32,
11467    #[doc = "Bitmap indicating which EKF outputs are valid."]
11468    pub flags: EstimatorStatusFlags,
11469}
11470impl ESTIMATOR_STATUS_DATA {
11471    pub const ENCODED_LEN: usize = 42usize;
11472    pub const DEFAULT: Self = Self {
11473        time_usec: 0_u64,
11474        vel_ratio: 0.0_f32,
11475        pos_horiz_ratio: 0.0_f32,
11476        pos_vert_ratio: 0.0_f32,
11477        mag_ratio: 0.0_f32,
11478        hagl_ratio: 0.0_f32,
11479        tas_ratio: 0.0_f32,
11480        pos_horiz_accuracy: 0.0_f32,
11481        pos_vert_accuracy: 0.0_f32,
11482        flags: EstimatorStatusFlags::DEFAULT,
11483    };
11484    #[cfg(feature = "arbitrary")]
11485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11486        use arbitrary::{Arbitrary, Unstructured};
11487        let mut buf = [0u8; 1024];
11488        rng.fill_bytes(&mut buf);
11489        let mut unstructured = Unstructured::new(&buf);
11490        Self::arbitrary(&mut unstructured).unwrap_or_default()
11491    }
11492}
11493impl Default for ESTIMATOR_STATUS_DATA {
11494    fn default() -> Self {
11495        Self::DEFAULT.clone()
11496    }
11497}
11498impl MessageData for ESTIMATOR_STATUS_DATA {
11499    type Message = MavMessage;
11500    const ID: u32 = 230u32;
11501    const NAME: &'static str = "ESTIMATOR_STATUS";
11502    const EXTRA_CRC: u8 = 163u8;
11503    const ENCODED_LEN: usize = 42usize;
11504    fn deser(
11505        _version: MavlinkVersion,
11506        __input: &[u8],
11507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11508        let avail_len = __input.len();
11509        let mut payload_buf = [0; Self::ENCODED_LEN];
11510        let mut buf = if avail_len < Self::ENCODED_LEN {
11511            payload_buf[0..avail_len].copy_from_slice(__input);
11512            Bytes::new(&payload_buf)
11513        } else {
11514            Bytes::new(__input)
11515        };
11516        let mut __struct = Self::default();
11517        __struct.time_usec = buf.get_u64_le();
11518        __struct.vel_ratio = buf.get_f32_le();
11519        __struct.pos_horiz_ratio = buf.get_f32_le();
11520        __struct.pos_vert_ratio = buf.get_f32_le();
11521        __struct.mag_ratio = buf.get_f32_le();
11522        __struct.hagl_ratio = buf.get_f32_le();
11523        __struct.tas_ratio = buf.get_f32_le();
11524        __struct.pos_horiz_accuracy = buf.get_f32_le();
11525        __struct.pos_vert_accuracy = buf.get_f32_le();
11526        let tmp = buf.get_u16_le();
11527        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11528            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11529                flag_type: "EstimatorStatusFlags",
11530                value: tmp as u32,
11531            })?;
11532        Ok(__struct)
11533    }
11534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11535        let mut __tmp = BytesMut::new(bytes);
11536        #[allow(clippy::absurd_extreme_comparisons)]
11537        #[allow(unused_comparisons)]
11538        if __tmp.remaining() < Self::ENCODED_LEN {
11539            panic!(
11540                "buffer is too small (need {} bytes, but got {})",
11541                Self::ENCODED_LEN,
11542                __tmp.remaining(),
11543            )
11544        }
11545        __tmp.put_u64_le(self.time_usec);
11546        __tmp.put_f32_le(self.vel_ratio);
11547        __tmp.put_f32_le(self.pos_horiz_ratio);
11548        __tmp.put_f32_le(self.pos_vert_ratio);
11549        __tmp.put_f32_le(self.mag_ratio);
11550        __tmp.put_f32_le(self.hagl_ratio);
11551        __tmp.put_f32_le(self.tas_ratio);
11552        __tmp.put_f32_le(self.pos_horiz_accuracy);
11553        __tmp.put_f32_le(self.pos_vert_accuracy);
11554        __tmp.put_u16_le(self.flags.bits());
11555        if matches!(version, MavlinkVersion::V2) {
11556            let len = __tmp.len();
11557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11558        } else {
11559            __tmp.len()
11560        }
11561    }
11562}
11563#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11564#[doc = ""]
11565#[doc = "ID: 410"]
11566#[derive(Debug, Clone, PartialEq)]
11567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11569#[cfg_attr(feature = "ts", derive(TS))]
11570#[cfg_attr(feature = "ts", ts(export))]
11571pub struct EVENT_DATA {
11572    #[doc = "Event ID (as defined in the component metadata)"]
11573    pub id: u32,
11574    #[doc = "Timestamp (time since system boot when the event happened)."]
11575    pub event_time_boot_ms: u32,
11576    #[doc = "Sequence number."]
11577    pub sequence: u16,
11578    #[doc = "Component ID"]
11579    pub destination_component: u8,
11580    #[doc = "System ID"]
11581    pub destination_system: u8,
11582    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11583    pub log_levels: u8,
11584    #[doc = "Arguments (depend on event ID)."]
11585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11587    pub arguments: [u8; 40],
11588}
11589impl EVENT_DATA {
11590    pub const ENCODED_LEN: usize = 53usize;
11591    pub const DEFAULT: Self = Self {
11592        id: 0_u32,
11593        event_time_boot_ms: 0_u32,
11594        sequence: 0_u16,
11595        destination_component: 0_u8,
11596        destination_system: 0_u8,
11597        log_levels: 0_u8,
11598        arguments: [0_u8; 40usize],
11599    };
11600    #[cfg(feature = "arbitrary")]
11601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11602        use arbitrary::{Arbitrary, Unstructured};
11603        let mut buf = [0u8; 1024];
11604        rng.fill_bytes(&mut buf);
11605        let mut unstructured = Unstructured::new(&buf);
11606        Self::arbitrary(&mut unstructured).unwrap_or_default()
11607    }
11608}
11609impl Default for EVENT_DATA {
11610    fn default() -> Self {
11611        Self::DEFAULT.clone()
11612    }
11613}
11614impl MessageData for EVENT_DATA {
11615    type Message = MavMessage;
11616    const ID: u32 = 410u32;
11617    const NAME: &'static str = "EVENT";
11618    const EXTRA_CRC: u8 = 160u8;
11619    const ENCODED_LEN: usize = 53usize;
11620    fn deser(
11621        _version: MavlinkVersion,
11622        __input: &[u8],
11623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11624        let avail_len = __input.len();
11625        let mut payload_buf = [0; Self::ENCODED_LEN];
11626        let mut buf = if avail_len < Self::ENCODED_LEN {
11627            payload_buf[0..avail_len].copy_from_slice(__input);
11628            Bytes::new(&payload_buf)
11629        } else {
11630            Bytes::new(__input)
11631        };
11632        let mut __struct = Self::default();
11633        __struct.id = buf.get_u32_le();
11634        __struct.event_time_boot_ms = buf.get_u32_le();
11635        __struct.sequence = buf.get_u16_le();
11636        __struct.destination_component = buf.get_u8();
11637        __struct.destination_system = buf.get_u8();
11638        __struct.log_levels = buf.get_u8();
11639        for v in &mut __struct.arguments {
11640            let val = buf.get_u8();
11641            *v = val;
11642        }
11643        Ok(__struct)
11644    }
11645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11646        let mut __tmp = BytesMut::new(bytes);
11647        #[allow(clippy::absurd_extreme_comparisons)]
11648        #[allow(unused_comparisons)]
11649        if __tmp.remaining() < Self::ENCODED_LEN {
11650            panic!(
11651                "buffer is too small (need {} bytes, but got {})",
11652                Self::ENCODED_LEN,
11653                __tmp.remaining(),
11654            )
11655        }
11656        __tmp.put_u32_le(self.id);
11657        __tmp.put_u32_le(self.event_time_boot_ms);
11658        __tmp.put_u16_le(self.sequence);
11659        __tmp.put_u8(self.destination_component);
11660        __tmp.put_u8(self.destination_system);
11661        __tmp.put_u8(self.log_levels);
11662        for val in &self.arguments {
11663            __tmp.put_u8(*val);
11664        }
11665        if matches!(version, MavlinkVersion::V2) {
11666            let len = __tmp.len();
11667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11668        } else {
11669            __tmp.len()
11670        }
11671    }
11672}
11673#[doc = "Provides state for additional features."]
11674#[doc = ""]
11675#[doc = "ID: 245"]
11676#[derive(Debug, Clone, PartialEq)]
11677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11679#[cfg_attr(feature = "ts", derive(TS))]
11680#[cfg_attr(feature = "ts", ts(export))]
11681pub struct EXTENDED_SYS_STATE_DATA {
11682    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11683    pub vtol_state: MavVtolState,
11684    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11685    pub landed_state: MavLandedState,
11686}
11687impl EXTENDED_SYS_STATE_DATA {
11688    pub const ENCODED_LEN: usize = 2usize;
11689    pub const DEFAULT: Self = Self {
11690        vtol_state: MavVtolState::DEFAULT,
11691        landed_state: MavLandedState::DEFAULT,
11692    };
11693    #[cfg(feature = "arbitrary")]
11694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11695        use arbitrary::{Arbitrary, Unstructured};
11696        let mut buf = [0u8; 1024];
11697        rng.fill_bytes(&mut buf);
11698        let mut unstructured = Unstructured::new(&buf);
11699        Self::arbitrary(&mut unstructured).unwrap_or_default()
11700    }
11701}
11702impl Default for EXTENDED_SYS_STATE_DATA {
11703    fn default() -> Self {
11704        Self::DEFAULT.clone()
11705    }
11706}
11707impl MessageData for EXTENDED_SYS_STATE_DATA {
11708    type Message = MavMessage;
11709    const ID: u32 = 245u32;
11710    const NAME: &'static str = "EXTENDED_SYS_STATE";
11711    const EXTRA_CRC: u8 = 130u8;
11712    const ENCODED_LEN: usize = 2usize;
11713    fn deser(
11714        _version: MavlinkVersion,
11715        __input: &[u8],
11716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11717        let avail_len = __input.len();
11718        let mut payload_buf = [0; Self::ENCODED_LEN];
11719        let mut buf = if avail_len < Self::ENCODED_LEN {
11720            payload_buf[0..avail_len].copy_from_slice(__input);
11721            Bytes::new(&payload_buf)
11722        } else {
11723            Bytes::new(__input)
11724        };
11725        let mut __struct = Self::default();
11726        let tmp = buf.get_u8();
11727        __struct.vtol_state =
11728            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11729                enum_type: "MavVtolState",
11730                value: tmp as u32,
11731            })?;
11732        let tmp = buf.get_u8();
11733        __struct.landed_state =
11734            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11735                enum_type: "MavLandedState",
11736                value: tmp as u32,
11737            })?;
11738        Ok(__struct)
11739    }
11740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11741        let mut __tmp = BytesMut::new(bytes);
11742        #[allow(clippy::absurd_extreme_comparisons)]
11743        #[allow(unused_comparisons)]
11744        if __tmp.remaining() < Self::ENCODED_LEN {
11745            panic!(
11746                "buffer is too small (need {} bytes, but got {})",
11747                Self::ENCODED_LEN,
11748                __tmp.remaining(),
11749            )
11750        }
11751        __tmp.put_u8(self.vtol_state as u8);
11752        __tmp.put_u8(self.landed_state as u8);
11753        if matches!(version, MavlinkVersion::V2) {
11754            let len = __tmp.len();
11755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11756        } else {
11757            __tmp.len()
11758        }
11759    }
11760}
11761#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11762#[doc = ""]
11763#[doc = "ID: 162"]
11764#[derive(Debug, Clone, PartialEq)]
11765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11767#[cfg_attr(feature = "ts", derive(TS))]
11768#[cfg_attr(feature = "ts", ts(export))]
11769pub struct FENCE_STATUS_DATA {
11770    #[doc = "Time (since boot) of last breach."]
11771    pub breach_time: u32,
11772    #[doc = "Number of fence breaches."]
11773    pub breach_count: u16,
11774    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11775    pub breach_status: u8,
11776    #[doc = "Last breach type."]
11777    pub breach_type: FenceBreach,
11778    #[doc = "Active action to prevent fence breach"]
11779    #[cfg_attr(feature = "serde", serde(default))]
11780    pub breach_mitigation: FenceMitigate,
11781}
11782impl FENCE_STATUS_DATA {
11783    pub const ENCODED_LEN: usize = 9usize;
11784    pub const DEFAULT: Self = Self {
11785        breach_time: 0_u32,
11786        breach_count: 0_u16,
11787        breach_status: 0_u8,
11788        breach_type: FenceBreach::DEFAULT,
11789        breach_mitigation: FenceMitigate::DEFAULT,
11790    };
11791    #[cfg(feature = "arbitrary")]
11792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11793        use arbitrary::{Arbitrary, Unstructured};
11794        let mut buf = [0u8; 1024];
11795        rng.fill_bytes(&mut buf);
11796        let mut unstructured = Unstructured::new(&buf);
11797        Self::arbitrary(&mut unstructured).unwrap_or_default()
11798    }
11799}
11800impl Default for FENCE_STATUS_DATA {
11801    fn default() -> Self {
11802        Self::DEFAULT.clone()
11803    }
11804}
11805impl MessageData for FENCE_STATUS_DATA {
11806    type Message = MavMessage;
11807    const ID: u32 = 162u32;
11808    const NAME: &'static str = "FENCE_STATUS";
11809    const EXTRA_CRC: u8 = 189u8;
11810    const ENCODED_LEN: usize = 9usize;
11811    fn deser(
11812        _version: MavlinkVersion,
11813        __input: &[u8],
11814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11815        let avail_len = __input.len();
11816        let mut payload_buf = [0; Self::ENCODED_LEN];
11817        let mut buf = if avail_len < Self::ENCODED_LEN {
11818            payload_buf[0..avail_len].copy_from_slice(__input);
11819            Bytes::new(&payload_buf)
11820        } else {
11821            Bytes::new(__input)
11822        };
11823        let mut __struct = Self::default();
11824        __struct.breach_time = buf.get_u32_le();
11825        __struct.breach_count = buf.get_u16_le();
11826        __struct.breach_status = buf.get_u8();
11827        let tmp = buf.get_u8();
11828        __struct.breach_type =
11829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11830                enum_type: "FenceBreach",
11831                value: tmp as u32,
11832            })?;
11833        let tmp = buf.get_u8();
11834        __struct.breach_mitigation =
11835            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11836                enum_type: "FenceMitigate",
11837                value: tmp as u32,
11838            })?;
11839        Ok(__struct)
11840    }
11841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11842        let mut __tmp = BytesMut::new(bytes);
11843        #[allow(clippy::absurd_extreme_comparisons)]
11844        #[allow(unused_comparisons)]
11845        if __tmp.remaining() < Self::ENCODED_LEN {
11846            panic!(
11847                "buffer is too small (need {} bytes, but got {})",
11848                Self::ENCODED_LEN,
11849                __tmp.remaining(),
11850            )
11851        }
11852        __tmp.put_u32_le(self.breach_time);
11853        __tmp.put_u16_le(self.breach_count);
11854        __tmp.put_u8(self.breach_status);
11855        __tmp.put_u8(self.breach_type as u8);
11856        if matches!(version, MavlinkVersion::V2) {
11857            __tmp.put_u8(self.breach_mitigation as u8);
11858            let len = __tmp.len();
11859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11860        } else {
11861            __tmp.len()
11862        }
11863    }
11864}
11865#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11866#[doc = ""]
11867#[doc = "ID: 110"]
11868#[derive(Debug, Clone, PartialEq)]
11869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11871#[cfg_attr(feature = "ts", derive(TS))]
11872#[cfg_attr(feature = "ts", ts(export))]
11873pub struct FILE_TRANSFER_PROTOCOL_DATA {
11874    #[doc = "Network ID (0 for broadcast)"]
11875    pub target_network: u8,
11876    #[doc = "System ID (0 for broadcast)"]
11877    pub target_system: u8,
11878    #[doc = "Component ID (0 for broadcast)"]
11879    pub target_component: u8,
11880    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11882    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11883    pub payload: [u8; 251],
11884}
11885impl FILE_TRANSFER_PROTOCOL_DATA {
11886    pub const ENCODED_LEN: usize = 254usize;
11887    pub const DEFAULT: Self = Self {
11888        target_network: 0_u8,
11889        target_system: 0_u8,
11890        target_component: 0_u8,
11891        payload: [0_u8; 251usize],
11892    };
11893    #[cfg(feature = "arbitrary")]
11894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11895        use arbitrary::{Arbitrary, Unstructured};
11896        let mut buf = [0u8; 1024];
11897        rng.fill_bytes(&mut buf);
11898        let mut unstructured = Unstructured::new(&buf);
11899        Self::arbitrary(&mut unstructured).unwrap_or_default()
11900    }
11901}
11902impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11903    fn default() -> Self {
11904        Self::DEFAULT.clone()
11905    }
11906}
11907impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11908    type Message = MavMessage;
11909    const ID: u32 = 110u32;
11910    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11911    const EXTRA_CRC: u8 = 84u8;
11912    const ENCODED_LEN: usize = 254usize;
11913    fn deser(
11914        _version: MavlinkVersion,
11915        __input: &[u8],
11916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11917        let avail_len = __input.len();
11918        let mut payload_buf = [0; Self::ENCODED_LEN];
11919        let mut buf = if avail_len < Self::ENCODED_LEN {
11920            payload_buf[0..avail_len].copy_from_slice(__input);
11921            Bytes::new(&payload_buf)
11922        } else {
11923            Bytes::new(__input)
11924        };
11925        let mut __struct = Self::default();
11926        __struct.target_network = buf.get_u8();
11927        __struct.target_system = buf.get_u8();
11928        __struct.target_component = buf.get_u8();
11929        for v in &mut __struct.payload {
11930            let val = buf.get_u8();
11931            *v = val;
11932        }
11933        Ok(__struct)
11934    }
11935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11936        let mut __tmp = BytesMut::new(bytes);
11937        #[allow(clippy::absurd_extreme_comparisons)]
11938        #[allow(unused_comparisons)]
11939        if __tmp.remaining() < Self::ENCODED_LEN {
11940            panic!(
11941                "buffer is too small (need {} bytes, but got {})",
11942                Self::ENCODED_LEN,
11943                __tmp.remaining(),
11944            )
11945        }
11946        __tmp.put_u8(self.target_network);
11947        __tmp.put_u8(self.target_system);
11948        __tmp.put_u8(self.target_component);
11949        for val in &self.payload {
11950            __tmp.put_u8(*val);
11951        }
11952        if matches!(version, MavlinkVersion::V2) {
11953            let len = __tmp.len();
11954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11955        } else {
11956            __tmp.len()
11957        }
11958    }
11959}
11960#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11961#[doc = ""]
11962#[doc = "ID: 264"]
11963#[derive(Debug, Clone, PartialEq)]
11964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11966#[cfg_attr(feature = "ts", derive(TS))]
11967#[cfg_attr(feature = "ts", ts(export))]
11968pub struct FLIGHT_INFORMATION_DATA {
11969    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11970    pub arming_time_utc: u64,
11971    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11972    pub takeoff_time_utc: u64,
11973    #[doc = "Flight number. Note, field is misnamed UUID."]
11974    pub flight_uuid: u64,
11975    #[doc = "Timestamp (time since system boot)."]
11976    pub time_boot_ms: u32,
11977    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11979    pub landing_time: u32,
11980}
11981impl FLIGHT_INFORMATION_DATA {
11982    pub const ENCODED_LEN: usize = 32usize;
11983    pub const DEFAULT: Self = Self {
11984        arming_time_utc: 0_u64,
11985        takeoff_time_utc: 0_u64,
11986        flight_uuid: 0_u64,
11987        time_boot_ms: 0_u32,
11988        landing_time: 0_u32,
11989    };
11990    #[cfg(feature = "arbitrary")]
11991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11992        use arbitrary::{Arbitrary, Unstructured};
11993        let mut buf = [0u8; 1024];
11994        rng.fill_bytes(&mut buf);
11995        let mut unstructured = Unstructured::new(&buf);
11996        Self::arbitrary(&mut unstructured).unwrap_or_default()
11997    }
11998}
11999impl Default for FLIGHT_INFORMATION_DATA {
12000    fn default() -> Self {
12001        Self::DEFAULT.clone()
12002    }
12003}
12004impl MessageData for FLIGHT_INFORMATION_DATA {
12005    type Message = MavMessage;
12006    const ID: u32 = 264u32;
12007    const NAME: &'static str = "FLIGHT_INFORMATION";
12008    const EXTRA_CRC: u8 = 49u8;
12009    const ENCODED_LEN: usize = 32usize;
12010    fn deser(
12011        _version: MavlinkVersion,
12012        __input: &[u8],
12013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12014        let avail_len = __input.len();
12015        let mut payload_buf = [0; Self::ENCODED_LEN];
12016        let mut buf = if avail_len < Self::ENCODED_LEN {
12017            payload_buf[0..avail_len].copy_from_slice(__input);
12018            Bytes::new(&payload_buf)
12019        } else {
12020            Bytes::new(__input)
12021        };
12022        let mut __struct = Self::default();
12023        __struct.arming_time_utc = buf.get_u64_le();
12024        __struct.takeoff_time_utc = buf.get_u64_le();
12025        __struct.flight_uuid = buf.get_u64_le();
12026        __struct.time_boot_ms = buf.get_u32_le();
12027        __struct.landing_time = buf.get_u32_le();
12028        Ok(__struct)
12029    }
12030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12031        let mut __tmp = BytesMut::new(bytes);
12032        #[allow(clippy::absurd_extreme_comparisons)]
12033        #[allow(unused_comparisons)]
12034        if __tmp.remaining() < Self::ENCODED_LEN {
12035            panic!(
12036                "buffer is too small (need {} bytes, but got {})",
12037                Self::ENCODED_LEN,
12038                __tmp.remaining(),
12039            )
12040        }
12041        __tmp.put_u64_le(self.arming_time_utc);
12042        __tmp.put_u64_le(self.takeoff_time_utc);
12043        __tmp.put_u64_le(self.flight_uuid);
12044        __tmp.put_u32_le(self.time_boot_ms);
12045        if matches!(version, MavlinkVersion::V2) {
12046            __tmp.put_u32_le(self.landing_time);
12047            let len = __tmp.len();
12048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12049        } else {
12050            __tmp.len()
12051        }
12052    }
12053}
12054#[doc = "Current motion information from a designated system."]
12055#[doc = ""]
12056#[doc = "ID: 144"]
12057#[derive(Debug, Clone, PartialEq)]
12058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12060#[cfg_attr(feature = "ts", derive(TS))]
12061#[cfg_attr(feature = "ts", ts(export))]
12062pub struct FOLLOW_TARGET_DATA {
12063    #[doc = "Timestamp (time since system boot)."]
12064    pub timestamp: u64,
12065    #[doc = "button states or switches of a tracker device"]
12066    pub custom_state: u64,
12067    #[doc = "Latitude (WGS84)"]
12068    pub lat: i32,
12069    #[doc = "Longitude (WGS84)"]
12070    pub lon: i32,
12071    #[doc = "Altitude (MSL)"]
12072    pub alt: f32,
12073    #[doc = "target velocity (0,0,0) for unknown"]
12074    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12075    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12076    pub vel: [f32; 3],
12077    #[doc = "linear target acceleration (0,0,0) for unknown"]
12078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12079    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12080    pub acc: [f32; 3],
12081    #[doc = "(0 0 0 0 for unknown)"]
12082    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12083    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12084    pub attitude_q: [f32; 4],
12085    #[doc = "(0 0 0 for unknown)"]
12086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12087    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12088    pub rates: [f32; 3],
12089    #[doc = "eph epv"]
12090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12092    pub position_cov: [f32; 3],
12093    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12094    pub est_capabilities: u8,
12095}
12096impl FOLLOW_TARGET_DATA {
12097    pub const ENCODED_LEN: usize = 93usize;
12098    pub const DEFAULT: Self = Self {
12099        timestamp: 0_u64,
12100        custom_state: 0_u64,
12101        lat: 0_i32,
12102        lon: 0_i32,
12103        alt: 0.0_f32,
12104        vel: [0.0_f32; 3usize],
12105        acc: [0.0_f32; 3usize],
12106        attitude_q: [0.0_f32; 4usize],
12107        rates: [0.0_f32; 3usize],
12108        position_cov: [0.0_f32; 3usize],
12109        est_capabilities: 0_u8,
12110    };
12111    #[cfg(feature = "arbitrary")]
12112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12113        use arbitrary::{Arbitrary, Unstructured};
12114        let mut buf = [0u8; 1024];
12115        rng.fill_bytes(&mut buf);
12116        let mut unstructured = Unstructured::new(&buf);
12117        Self::arbitrary(&mut unstructured).unwrap_or_default()
12118    }
12119}
12120impl Default for FOLLOW_TARGET_DATA {
12121    fn default() -> Self {
12122        Self::DEFAULT.clone()
12123    }
12124}
12125impl MessageData for FOLLOW_TARGET_DATA {
12126    type Message = MavMessage;
12127    const ID: u32 = 144u32;
12128    const NAME: &'static str = "FOLLOW_TARGET";
12129    const EXTRA_CRC: u8 = 127u8;
12130    const ENCODED_LEN: usize = 93usize;
12131    fn deser(
12132        _version: MavlinkVersion,
12133        __input: &[u8],
12134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12135        let avail_len = __input.len();
12136        let mut payload_buf = [0; Self::ENCODED_LEN];
12137        let mut buf = if avail_len < Self::ENCODED_LEN {
12138            payload_buf[0..avail_len].copy_from_slice(__input);
12139            Bytes::new(&payload_buf)
12140        } else {
12141            Bytes::new(__input)
12142        };
12143        let mut __struct = Self::default();
12144        __struct.timestamp = buf.get_u64_le();
12145        __struct.custom_state = buf.get_u64_le();
12146        __struct.lat = buf.get_i32_le();
12147        __struct.lon = buf.get_i32_le();
12148        __struct.alt = buf.get_f32_le();
12149        for v in &mut __struct.vel {
12150            let val = buf.get_f32_le();
12151            *v = val;
12152        }
12153        for v in &mut __struct.acc {
12154            let val = buf.get_f32_le();
12155            *v = val;
12156        }
12157        for v in &mut __struct.attitude_q {
12158            let val = buf.get_f32_le();
12159            *v = val;
12160        }
12161        for v in &mut __struct.rates {
12162            let val = buf.get_f32_le();
12163            *v = val;
12164        }
12165        for v in &mut __struct.position_cov {
12166            let val = buf.get_f32_le();
12167            *v = val;
12168        }
12169        __struct.est_capabilities = buf.get_u8();
12170        Ok(__struct)
12171    }
12172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12173        let mut __tmp = BytesMut::new(bytes);
12174        #[allow(clippy::absurd_extreme_comparisons)]
12175        #[allow(unused_comparisons)]
12176        if __tmp.remaining() < Self::ENCODED_LEN {
12177            panic!(
12178                "buffer is too small (need {} bytes, but got {})",
12179                Self::ENCODED_LEN,
12180                __tmp.remaining(),
12181            )
12182        }
12183        __tmp.put_u64_le(self.timestamp);
12184        __tmp.put_u64_le(self.custom_state);
12185        __tmp.put_i32_le(self.lat);
12186        __tmp.put_i32_le(self.lon);
12187        __tmp.put_f32_le(self.alt);
12188        for val in &self.vel {
12189            __tmp.put_f32_le(*val);
12190        }
12191        for val in &self.acc {
12192            __tmp.put_f32_le(*val);
12193        }
12194        for val in &self.attitude_q {
12195            __tmp.put_f32_le(*val);
12196        }
12197        for val in &self.rates {
12198            __tmp.put_f32_le(*val);
12199        }
12200        for val in &self.position_cov {
12201            __tmp.put_f32_le(*val);
12202        }
12203        __tmp.put_u8(self.est_capabilities);
12204        if matches!(version, MavlinkVersion::V2) {
12205            let len = __tmp.len();
12206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12207        } else {
12208            __tmp.len()
12209        }
12210    }
12211}
12212#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12213#[doc = ""]
12214#[doc = "ID: 371"]
12215#[derive(Debug, Clone, PartialEq)]
12216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12218#[cfg_attr(feature = "ts", derive(TS))]
12219#[cfg_attr(feature = "ts", ts(export))]
12220pub struct FUEL_STATUS_DATA {
12221    #[doc = "Capacity when full. Must be provided."]
12222    pub maximum_fuel: f32,
12223    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12224    pub consumed_fuel: f32,
12225    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12226    pub remaining_fuel: f32,
12227    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12228    pub flow_rate: f32,
12229    #[doc = "Fuel temperature. NaN: field not provided."]
12230    pub temperature: f32,
12231    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12232    pub fuel_type: MavFuelType,
12233    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12234    pub id: u8,
12235    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12236    pub percent_remaining: u8,
12237}
12238impl FUEL_STATUS_DATA {
12239    pub const ENCODED_LEN: usize = 26usize;
12240    pub const DEFAULT: Self = Self {
12241        maximum_fuel: 0.0_f32,
12242        consumed_fuel: 0.0_f32,
12243        remaining_fuel: 0.0_f32,
12244        flow_rate: 0.0_f32,
12245        temperature: 0.0_f32,
12246        fuel_type: MavFuelType::DEFAULT,
12247        id: 0_u8,
12248        percent_remaining: 0_u8,
12249    };
12250    #[cfg(feature = "arbitrary")]
12251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12252        use arbitrary::{Arbitrary, Unstructured};
12253        let mut buf = [0u8; 1024];
12254        rng.fill_bytes(&mut buf);
12255        let mut unstructured = Unstructured::new(&buf);
12256        Self::arbitrary(&mut unstructured).unwrap_or_default()
12257    }
12258}
12259impl Default for FUEL_STATUS_DATA {
12260    fn default() -> Self {
12261        Self::DEFAULT.clone()
12262    }
12263}
12264impl MessageData for FUEL_STATUS_DATA {
12265    type Message = MavMessage;
12266    const ID: u32 = 371u32;
12267    const NAME: &'static str = "FUEL_STATUS";
12268    const EXTRA_CRC: u8 = 10u8;
12269    const ENCODED_LEN: usize = 26usize;
12270    fn deser(
12271        _version: MavlinkVersion,
12272        __input: &[u8],
12273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12274        let avail_len = __input.len();
12275        let mut payload_buf = [0; Self::ENCODED_LEN];
12276        let mut buf = if avail_len < Self::ENCODED_LEN {
12277            payload_buf[0..avail_len].copy_from_slice(__input);
12278            Bytes::new(&payload_buf)
12279        } else {
12280            Bytes::new(__input)
12281        };
12282        let mut __struct = Self::default();
12283        __struct.maximum_fuel = buf.get_f32_le();
12284        __struct.consumed_fuel = buf.get_f32_le();
12285        __struct.remaining_fuel = buf.get_f32_le();
12286        __struct.flow_rate = buf.get_f32_le();
12287        __struct.temperature = buf.get_f32_le();
12288        let tmp = buf.get_u32_le();
12289        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12290            ::mavlink_core::error::ParserError::InvalidEnum {
12291                enum_type: "MavFuelType",
12292                value: tmp as u32,
12293            },
12294        )?;
12295        __struct.id = buf.get_u8();
12296        __struct.percent_remaining = buf.get_u8();
12297        Ok(__struct)
12298    }
12299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12300        let mut __tmp = BytesMut::new(bytes);
12301        #[allow(clippy::absurd_extreme_comparisons)]
12302        #[allow(unused_comparisons)]
12303        if __tmp.remaining() < Self::ENCODED_LEN {
12304            panic!(
12305                "buffer is too small (need {} bytes, but got {})",
12306                Self::ENCODED_LEN,
12307                __tmp.remaining(),
12308            )
12309        }
12310        __tmp.put_f32_le(self.maximum_fuel);
12311        __tmp.put_f32_le(self.consumed_fuel);
12312        __tmp.put_f32_le(self.remaining_fuel);
12313        __tmp.put_f32_le(self.flow_rate);
12314        __tmp.put_f32_le(self.temperature);
12315        __tmp.put_u32_le(self.fuel_type as u32);
12316        __tmp.put_u8(self.id);
12317        __tmp.put_u8(self.percent_remaining);
12318        if matches!(version, MavlinkVersion::V2) {
12319            let len = __tmp.len();
12320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12321        } else {
12322            __tmp.len()
12323        }
12324    }
12325}
12326#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12327#[doc = ""]
12328#[doc = "ID: 373"]
12329#[derive(Debug, Clone, PartialEq)]
12330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12332#[cfg_attr(feature = "ts", derive(TS))]
12333#[cfg_attr(feature = "ts", ts(export))]
12334pub struct GENERATOR_STATUS_DATA {
12335    #[doc = "Status flags."]
12336    pub status: MavGeneratorStatusFlag,
12337    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12338    pub battery_current: f32,
12339    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12340    pub load_current: f32,
12341    #[doc = "The power being generated. NaN: field not provided"]
12342    pub power_generated: f32,
12343    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12344    pub bus_voltage: f32,
12345    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12346    pub bat_current_setpoint: f32,
12347    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12348    pub runtime: u32,
12349    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12350    pub time_until_maintenance: i32,
12351    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12352    pub generator_speed: u16,
12353    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12354    pub rectifier_temperature: i16,
12355    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12356    pub generator_temperature: i16,
12357}
12358impl GENERATOR_STATUS_DATA {
12359    pub const ENCODED_LEN: usize = 42usize;
12360    pub const DEFAULT: Self = Self {
12361        status: MavGeneratorStatusFlag::DEFAULT,
12362        battery_current: 0.0_f32,
12363        load_current: 0.0_f32,
12364        power_generated: 0.0_f32,
12365        bus_voltage: 0.0_f32,
12366        bat_current_setpoint: 0.0_f32,
12367        runtime: 0_u32,
12368        time_until_maintenance: 0_i32,
12369        generator_speed: 0_u16,
12370        rectifier_temperature: 0_i16,
12371        generator_temperature: 0_i16,
12372    };
12373    #[cfg(feature = "arbitrary")]
12374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12375        use arbitrary::{Arbitrary, Unstructured};
12376        let mut buf = [0u8; 1024];
12377        rng.fill_bytes(&mut buf);
12378        let mut unstructured = Unstructured::new(&buf);
12379        Self::arbitrary(&mut unstructured).unwrap_or_default()
12380    }
12381}
12382impl Default for GENERATOR_STATUS_DATA {
12383    fn default() -> Self {
12384        Self::DEFAULT.clone()
12385    }
12386}
12387impl MessageData for GENERATOR_STATUS_DATA {
12388    type Message = MavMessage;
12389    const ID: u32 = 373u32;
12390    const NAME: &'static str = "GENERATOR_STATUS";
12391    const EXTRA_CRC: u8 = 117u8;
12392    const ENCODED_LEN: usize = 42usize;
12393    fn deser(
12394        _version: MavlinkVersion,
12395        __input: &[u8],
12396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12397        let avail_len = __input.len();
12398        let mut payload_buf = [0; Self::ENCODED_LEN];
12399        let mut buf = if avail_len < Self::ENCODED_LEN {
12400            payload_buf[0..avail_len].copy_from_slice(__input);
12401            Bytes::new(&payload_buf)
12402        } else {
12403            Bytes::new(__input)
12404        };
12405        let mut __struct = Self::default();
12406        let tmp = buf.get_u64_le();
12407        __struct.status = MavGeneratorStatusFlag::from_bits(
12408            tmp & MavGeneratorStatusFlag::all().bits(),
12409        )
12410        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12411            flag_type: "MavGeneratorStatusFlag",
12412            value: tmp as u32,
12413        })?;
12414        __struct.battery_current = buf.get_f32_le();
12415        __struct.load_current = buf.get_f32_le();
12416        __struct.power_generated = buf.get_f32_le();
12417        __struct.bus_voltage = buf.get_f32_le();
12418        __struct.bat_current_setpoint = buf.get_f32_le();
12419        __struct.runtime = buf.get_u32_le();
12420        __struct.time_until_maintenance = buf.get_i32_le();
12421        __struct.generator_speed = buf.get_u16_le();
12422        __struct.rectifier_temperature = buf.get_i16_le();
12423        __struct.generator_temperature = buf.get_i16_le();
12424        Ok(__struct)
12425    }
12426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12427        let mut __tmp = BytesMut::new(bytes);
12428        #[allow(clippy::absurd_extreme_comparisons)]
12429        #[allow(unused_comparisons)]
12430        if __tmp.remaining() < Self::ENCODED_LEN {
12431            panic!(
12432                "buffer is too small (need {} bytes, but got {})",
12433                Self::ENCODED_LEN,
12434                __tmp.remaining(),
12435            )
12436        }
12437        __tmp.put_u64_le(self.status.bits());
12438        __tmp.put_f32_le(self.battery_current);
12439        __tmp.put_f32_le(self.load_current);
12440        __tmp.put_f32_le(self.power_generated);
12441        __tmp.put_f32_le(self.bus_voltage);
12442        __tmp.put_f32_le(self.bat_current_setpoint);
12443        __tmp.put_u32_le(self.runtime);
12444        __tmp.put_i32_le(self.time_until_maintenance);
12445        __tmp.put_u16_le(self.generator_speed);
12446        __tmp.put_i16_le(self.rectifier_temperature);
12447        __tmp.put_i16_le(self.generator_temperature);
12448        if matches!(version, MavlinkVersion::V2) {
12449            let len = __tmp.len();
12450            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12451        } else {
12452            __tmp.len()
12453        }
12454    }
12455}
12456#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12457#[doc = ""]
12458#[doc = "ID: 285"]
12459#[derive(Debug, Clone, PartialEq)]
12460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12462#[cfg_attr(feature = "ts", derive(TS))]
12463#[cfg_attr(feature = "ts", ts(export))]
12464pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12465    #[doc = "Timestamp (time since system boot)."]
12466    pub time_boot_ms: u32,
12467    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12470    pub q: [f32; 4],
12471    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12472    pub angular_velocity_x: f32,
12473    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12474    pub angular_velocity_y: f32,
12475    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12476    pub angular_velocity_z: f32,
12477    #[doc = "Failure flags (0 for no failure)"]
12478    pub failure_flags: GimbalDeviceErrorFlags,
12479    #[doc = "Current gimbal flags set."]
12480    pub flags: GimbalDeviceFlags,
12481    #[doc = "System ID"]
12482    pub target_system: u8,
12483    #[doc = "Component ID"]
12484    pub target_component: u8,
12485    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12487    pub delta_yaw: f32,
12488    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12490    pub delta_yaw_velocity: f32,
12491    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12492    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12493    pub gimbal_device_id: u8,
12494}
12495impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12496    pub const ENCODED_LEN: usize = 49usize;
12497    pub const DEFAULT: Self = Self {
12498        time_boot_ms: 0_u32,
12499        q: [0.0_f32; 4usize],
12500        angular_velocity_x: 0.0_f32,
12501        angular_velocity_y: 0.0_f32,
12502        angular_velocity_z: 0.0_f32,
12503        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12504        flags: GimbalDeviceFlags::DEFAULT,
12505        target_system: 0_u8,
12506        target_component: 0_u8,
12507        delta_yaw: 0.0_f32,
12508        delta_yaw_velocity: 0.0_f32,
12509        gimbal_device_id: 0_u8,
12510    };
12511    #[cfg(feature = "arbitrary")]
12512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12513        use arbitrary::{Arbitrary, Unstructured};
12514        let mut buf = [0u8; 1024];
12515        rng.fill_bytes(&mut buf);
12516        let mut unstructured = Unstructured::new(&buf);
12517        Self::arbitrary(&mut unstructured).unwrap_or_default()
12518    }
12519}
12520impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12521    fn default() -> Self {
12522        Self::DEFAULT.clone()
12523    }
12524}
12525impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12526    type Message = MavMessage;
12527    const ID: u32 = 285u32;
12528    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12529    const EXTRA_CRC: u8 = 137u8;
12530    const ENCODED_LEN: usize = 49usize;
12531    fn deser(
12532        _version: MavlinkVersion,
12533        __input: &[u8],
12534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12535        let avail_len = __input.len();
12536        let mut payload_buf = [0; Self::ENCODED_LEN];
12537        let mut buf = if avail_len < Self::ENCODED_LEN {
12538            payload_buf[0..avail_len].copy_from_slice(__input);
12539            Bytes::new(&payload_buf)
12540        } else {
12541            Bytes::new(__input)
12542        };
12543        let mut __struct = Self::default();
12544        __struct.time_boot_ms = buf.get_u32_le();
12545        for v in &mut __struct.q {
12546            let val = buf.get_f32_le();
12547            *v = val;
12548        }
12549        __struct.angular_velocity_x = buf.get_f32_le();
12550        __struct.angular_velocity_y = buf.get_f32_le();
12551        __struct.angular_velocity_z = buf.get_f32_le();
12552        let tmp = buf.get_u32_le();
12553        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12554            tmp & GimbalDeviceErrorFlags::all().bits(),
12555        )
12556        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12557            flag_type: "GimbalDeviceErrorFlags",
12558            value: tmp as u32,
12559        })?;
12560        let tmp = buf.get_u16_le();
12561        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12562            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12563                flag_type: "GimbalDeviceFlags",
12564                value: tmp as u32,
12565            })?;
12566        __struct.target_system = buf.get_u8();
12567        __struct.target_component = buf.get_u8();
12568        __struct.delta_yaw = buf.get_f32_le();
12569        __struct.delta_yaw_velocity = buf.get_f32_le();
12570        __struct.gimbal_device_id = buf.get_u8();
12571        Ok(__struct)
12572    }
12573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12574        let mut __tmp = BytesMut::new(bytes);
12575        #[allow(clippy::absurd_extreme_comparisons)]
12576        #[allow(unused_comparisons)]
12577        if __tmp.remaining() < Self::ENCODED_LEN {
12578            panic!(
12579                "buffer is too small (need {} bytes, but got {})",
12580                Self::ENCODED_LEN,
12581                __tmp.remaining(),
12582            )
12583        }
12584        __tmp.put_u32_le(self.time_boot_ms);
12585        for val in &self.q {
12586            __tmp.put_f32_le(*val);
12587        }
12588        __tmp.put_f32_le(self.angular_velocity_x);
12589        __tmp.put_f32_le(self.angular_velocity_y);
12590        __tmp.put_f32_le(self.angular_velocity_z);
12591        __tmp.put_u32_le(self.failure_flags.bits());
12592        __tmp.put_u16_le(self.flags.bits());
12593        __tmp.put_u8(self.target_system);
12594        __tmp.put_u8(self.target_component);
12595        if matches!(version, MavlinkVersion::V2) {
12596            __tmp.put_f32_le(self.delta_yaw);
12597            __tmp.put_f32_le(self.delta_yaw_velocity);
12598            __tmp.put_u8(self.gimbal_device_id);
12599            let len = __tmp.len();
12600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12601        } else {
12602            __tmp.len()
12603        }
12604    }
12605}
12606#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12607#[doc = ""]
12608#[doc = "ID: 283"]
12609#[derive(Debug, Clone, PartialEq)]
12610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12612#[cfg_attr(feature = "ts", derive(TS))]
12613#[cfg_attr(feature = "ts", ts(export))]
12614pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12615    #[doc = "UID of gimbal hardware (0 if unknown)."]
12616    pub uid: u64,
12617    #[doc = "Timestamp (time since system boot)."]
12618    pub time_boot_ms: u32,
12619    #[doc = "0xff)."]
12620    pub firmware_version: u32,
12621    #[doc = "0xff)."]
12622    pub hardware_version: u32,
12623    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12624    pub roll_min: f32,
12625    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12626    pub roll_max: f32,
12627    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12628    pub pitch_min: f32,
12629    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12630    pub pitch_max: f32,
12631    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12632    pub yaw_min: f32,
12633    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12634    pub yaw_max: f32,
12635    #[doc = "Bitmap of gimbal capability flags."]
12636    pub cap_flags: GimbalDeviceCapFlags,
12637    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12638    pub custom_cap_flags: u16,
12639    #[doc = "Name of the gimbal vendor."]
12640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12641    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12642    pub vendor_name: [u8; 32],
12643    #[doc = "Name of the gimbal model."]
12644    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12645    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12646    pub model_name: [u8; 32],
12647    #[doc = "Custom name of the gimbal given to it by the user."]
12648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12649    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12650    pub custom_name: [u8; 32],
12651    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12653    pub gimbal_device_id: u8,
12654}
12655impl GIMBAL_DEVICE_INFORMATION_DATA {
12656    pub const ENCODED_LEN: usize = 145usize;
12657    pub const DEFAULT: Self = Self {
12658        uid: 0_u64,
12659        time_boot_ms: 0_u32,
12660        firmware_version: 0_u32,
12661        hardware_version: 0_u32,
12662        roll_min: 0.0_f32,
12663        roll_max: 0.0_f32,
12664        pitch_min: 0.0_f32,
12665        pitch_max: 0.0_f32,
12666        yaw_min: 0.0_f32,
12667        yaw_max: 0.0_f32,
12668        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12669        custom_cap_flags: 0_u16,
12670        vendor_name: [0_u8; 32usize],
12671        model_name: [0_u8; 32usize],
12672        custom_name: [0_u8; 32usize],
12673        gimbal_device_id: 0_u8,
12674    };
12675    #[cfg(feature = "arbitrary")]
12676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12677        use arbitrary::{Arbitrary, Unstructured};
12678        let mut buf = [0u8; 1024];
12679        rng.fill_bytes(&mut buf);
12680        let mut unstructured = Unstructured::new(&buf);
12681        Self::arbitrary(&mut unstructured).unwrap_or_default()
12682    }
12683}
12684impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12685    fn default() -> Self {
12686        Self::DEFAULT.clone()
12687    }
12688}
12689impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12690    type Message = MavMessage;
12691    const ID: u32 = 283u32;
12692    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12693    const EXTRA_CRC: u8 = 74u8;
12694    const ENCODED_LEN: usize = 145usize;
12695    fn deser(
12696        _version: MavlinkVersion,
12697        __input: &[u8],
12698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12699        let avail_len = __input.len();
12700        let mut payload_buf = [0; Self::ENCODED_LEN];
12701        let mut buf = if avail_len < Self::ENCODED_LEN {
12702            payload_buf[0..avail_len].copy_from_slice(__input);
12703            Bytes::new(&payload_buf)
12704        } else {
12705            Bytes::new(__input)
12706        };
12707        let mut __struct = Self::default();
12708        __struct.uid = buf.get_u64_le();
12709        __struct.time_boot_ms = buf.get_u32_le();
12710        __struct.firmware_version = buf.get_u32_le();
12711        __struct.hardware_version = buf.get_u32_le();
12712        __struct.roll_min = buf.get_f32_le();
12713        __struct.roll_max = buf.get_f32_le();
12714        __struct.pitch_min = buf.get_f32_le();
12715        __struct.pitch_max = buf.get_f32_le();
12716        __struct.yaw_min = buf.get_f32_le();
12717        __struct.yaw_max = buf.get_f32_le();
12718        let tmp = buf.get_u16_le();
12719        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12720            tmp & GimbalDeviceCapFlags::all().bits(),
12721        )
12722        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12723            flag_type: "GimbalDeviceCapFlags",
12724            value: tmp as u32,
12725        })?;
12726        __struct.custom_cap_flags = buf.get_u16_le();
12727        for v in &mut __struct.vendor_name {
12728            let val = buf.get_u8();
12729            *v = val;
12730        }
12731        for v in &mut __struct.model_name {
12732            let val = buf.get_u8();
12733            *v = val;
12734        }
12735        for v in &mut __struct.custom_name {
12736            let val = buf.get_u8();
12737            *v = val;
12738        }
12739        __struct.gimbal_device_id = buf.get_u8();
12740        Ok(__struct)
12741    }
12742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12743        let mut __tmp = BytesMut::new(bytes);
12744        #[allow(clippy::absurd_extreme_comparisons)]
12745        #[allow(unused_comparisons)]
12746        if __tmp.remaining() < Self::ENCODED_LEN {
12747            panic!(
12748                "buffer is too small (need {} bytes, but got {})",
12749                Self::ENCODED_LEN,
12750                __tmp.remaining(),
12751            )
12752        }
12753        __tmp.put_u64_le(self.uid);
12754        __tmp.put_u32_le(self.time_boot_ms);
12755        __tmp.put_u32_le(self.firmware_version);
12756        __tmp.put_u32_le(self.hardware_version);
12757        __tmp.put_f32_le(self.roll_min);
12758        __tmp.put_f32_le(self.roll_max);
12759        __tmp.put_f32_le(self.pitch_min);
12760        __tmp.put_f32_le(self.pitch_max);
12761        __tmp.put_f32_le(self.yaw_min);
12762        __tmp.put_f32_le(self.yaw_max);
12763        __tmp.put_u16_le(self.cap_flags.bits());
12764        __tmp.put_u16_le(self.custom_cap_flags);
12765        for val in &self.vendor_name {
12766            __tmp.put_u8(*val);
12767        }
12768        for val in &self.model_name {
12769            __tmp.put_u8(*val);
12770        }
12771        for val in &self.custom_name {
12772            __tmp.put_u8(*val);
12773        }
12774        if matches!(version, MavlinkVersion::V2) {
12775            __tmp.put_u8(self.gimbal_device_id);
12776            let len = __tmp.len();
12777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12778        } else {
12779            __tmp.len()
12780        }
12781    }
12782}
12783#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12784#[doc = ""]
12785#[doc = "ID: 284"]
12786#[derive(Debug, Clone, PartialEq)]
12787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12789#[cfg_attr(feature = "ts", derive(TS))]
12790#[cfg_attr(feature = "ts", ts(export))]
12791pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12792    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12793    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12794    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12795    pub q: [f32; 4],
12796    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12797    pub angular_velocity_x: f32,
12798    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12799    pub angular_velocity_y: f32,
12800    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12801    pub angular_velocity_z: f32,
12802    #[doc = "Low level gimbal flags."]
12803    pub flags: GimbalDeviceFlags,
12804    #[doc = "System ID"]
12805    pub target_system: u8,
12806    #[doc = "Component ID"]
12807    pub target_component: u8,
12808}
12809impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12810    pub const ENCODED_LEN: usize = 32usize;
12811    pub const DEFAULT: Self = Self {
12812        q: [0.0_f32; 4usize],
12813        angular_velocity_x: 0.0_f32,
12814        angular_velocity_y: 0.0_f32,
12815        angular_velocity_z: 0.0_f32,
12816        flags: GimbalDeviceFlags::DEFAULT,
12817        target_system: 0_u8,
12818        target_component: 0_u8,
12819    };
12820    #[cfg(feature = "arbitrary")]
12821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12822        use arbitrary::{Arbitrary, Unstructured};
12823        let mut buf = [0u8; 1024];
12824        rng.fill_bytes(&mut buf);
12825        let mut unstructured = Unstructured::new(&buf);
12826        Self::arbitrary(&mut unstructured).unwrap_or_default()
12827    }
12828}
12829impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12830    fn default() -> Self {
12831        Self::DEFAULT.clone()
12832    }
12833}
12834impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12835    type Message = MavMessage;
12836    const ID: u32 = 284u32;
12837    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12838    const EXTRA_CRC: u8 = 99u8;
12839    const ENCODED_LEN: usize = 32usize;
12840    fn deser(
12841        _version: MavlinkVersion,
12842        __input: &[u8],
12843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12844        let avail_len = __input.len();
12845        let mut payload_buf = [0; Self::ENCODED_LEN];
12846        let mut buf = if avail_len < Self::ENCODED_LEN {
12847            payload_buf[0..avail_len].copy_from_slice(__input);
12848            Bytes::new(&payload_buf)
12849        } else {
12850            Bytes::new(__input)
12851        };
12852        let mut __struct = Self::default();
12853        for v in &mut __struct.q {
12854            let val = buf.get_f32_le();
12855            *v = val;
12856        }
12857        __struct.angular_velocity_x = buf.get_f32_le();
12858        __struct.angular_velocity_y = buf.get_f32_le();
12859        __struct.angular_velocity_z = buf.get_f32_le();
12860        let tmp = buf.get_u16_le();
12861        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12862            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12863                flag_type: "GimbalDeviceFlags",
12864                value: tmp as u32,
12865            })?;
12866        __struct.target_system = buf.get_u8();
12867        __struct.target_component = buf.get_u8();
12868        Ok(__struct)
12869    }
12870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12871        let mut __tmp = BytesMut::new(bytes);
12872        #[allow(clippy::absurd_extreme_comparisons)]
12873        #[allow(unused_comparisons)]
12874        if __tmp.remaining() < Self::ENCODED_LEN {
12875            panic!(
12876                "buffer is too small (need {} bytes, but got {})",
12877                Self::ENCODED_LEN,
12878                __tmp.remaining(),
12879            )
12880        }
12881        for val in &self.q {
12882            __tmp.put_f32_le(*val);
12883        }
12884        __tmp.put_f32_le(self.angular_velocity_x);
12885        __tmp.put_f32_le(self.angular_velocity_y);
12886        __tmp.put_f32_le(self.angular_velocity_z);
12887        __tmp.put_u16_le(self.flags.bits());
12888        __tmp.put_u8(self.target_system);
12889        __tmp.put_u8(self.target_component);
12890        if matches!(version, MavlinkVersion::V2) {
12891            let len = __tmp.len();
12892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12893        } else {
12894            __tmp.len()
12895        }
12896    }
12897}
12898#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12899#[doc = ""]
12900#[doc = "ID: 280"]
12901#[derive(Debug, Clone, PartialEq)]
12902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12904#[cfg_attr(feature = "ts", derive(TS))]
12905#[cfg_attr(feature = "ts", ts(export))]
12906pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12907    #[doc = "Timestamp (time since system boot)."]
12908    pub time_boot_ms: u32,
12909    #[doc = "Bitmap of gimbal capability flags."]
12910    pub cap_flags: GimbalManagerCapFlags,
12911    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12912    pub roll_min: f32,
12913    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12914    pub roll_max: f32,
12915    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12916    pub pitch_min: f32,
12917    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12918    pub pitch_max: f32,
12919    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12920    pub yaw_min: f32,
12921    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12922    pub yaw_max: f32,
12923    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12924    pub gimbal_device_id: u8,
12925}
12926impl GIMBAL_MANAGER_INFORMATION_DATA {
12927    pub const ENCODED_LEN: usize = 33usize;
12928    pub const DEFAULT: Self = Self {
12929        time_boot_ms: 0_u32,
12930        cap_flags: GimbalManagerCapFlags::DEFAULT,
12931        roll_min: 0.0_f32,
12932        roll_max: 0.0_f32,
12933        pitch_min: 0.0_f32,
12934        pitch_max: 0.0_f32,
12935        yaw_min: 0.0_f32,
12936        yaw_max: 0.0_f32,
12937        gimbal_device_id: 0_u8,
12938    };
12939    #[cfg(feature = "arbitrary")]
12940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12941        use arbitrary::{Arbitrary, Unstructured};
12942        let mut buf = [0u8; 1024];
12943        rng.fill_bytes(&mut buf);
12944        let mut unstructured = Unstructured::new(&buf);
12945        Self::arbitrary(&mut unstructured).unwrap_or_default()
12946    }
12947}
12948impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12949    fn default() -> Self {
12950        Self::DEFAULT.clone()
12951    }
12952}
12953impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12954    type Message = MavMessage;
12955    const ID: u32 = 280u32;
12956    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12957    const EXTRA_CRC: u8 = 70u8;
12958    const ENCODED_LEN: usize = 33usize;
12959    fn deser(
12960        _version: MavlinkVersion,
12961        __input: &[u8],
12962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12963        let avail_len = __input.len();
12964        let mut payload_buf = [0; Self::ENCODED_LEN];
12965        let mut buf = if avail_len < Self::ENCODED_LEN {
12966            payload_buf[0..avail_len].copy_from_slice(__input);
12967            Bytes::new(&payload_buf)
12968        } else {
12969            Bytes::new(__input)
12970        };
12971        let mut __struct = Self::default();
12972        __struct.time_boot_ms = buf.get_u32_le();
12973        let tmp = buf.get_u32_le();
12974        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12975            tmp & GimbalManagerCapFlags::all().bits(),
12976        )
12977        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12978            flag_type: "GimbalManagerCapFlags",
12979            value: tmp as u32,
12980        })?;
12981        __struct.roll_min = buf.get_f32_le();
12982        __struct.roll_max = buf.get_f32_le();
12983        __struct.pitch_min = buf.get_f32_le();
12984        __struct.pitch_max = buf.get_f32_le();
12985        __struct.yaw_min = buf.get_f32_le();
12986        __struct.yaw_max = buf.get_f32_le();
12987        __struct.gimbal_device_id = buf.get_u8();
12988        Ok(__struct)
12989    }
12990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12991        let mut __tmp = BytesMut::new(bytes);
12992        #[allow(clippy::absurd_extreme_comparisons)]
12993        #[allow(unused_comparisons)]
12994        if __tmp.remaining() < Self::ENCODED_LEN {
12995            panic!(
12996                "buffer is too small (need {} bytes, but got {})",
12997                Self::ENCODED_LEN,
12998                __tmp.remaining(),
12999            )
13000        }
13001        __tmp.put_u32_le(self.time_boot_ms);
13002        __tmp.put_u32_le(self.cap_flags.bits());
13003        __tmp.put_f32_le(self.roll_min);
13004        __tmp.put_f32_le(self.roll_max);
13005        __tmp.put_f32_le(self.pitch_min);
13006        __tmp.put_f32_le(self.pitch_max);
13007        __tmp.put_f32_le(self.yaw_min);
13008        __tmp.put_f32_le(self.yaw_max);
13009        __tmp.put_u8(self.gimbal_device_id);
13010        if matches!(version, MavlinkVersion::V2) {
13011            let len = __tmp.len();
13012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13013        } else {
13014            __tmp.len()
13015        }
13016    }
13017}
13018#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13019#[doc = ""]
13020#[doc = "ID: 282"]
13021#[derive(Debug, Clone, PartialEq)]
13022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13024#[cfg_attr(feature = "ts", derive(TS))]
13025#[cfg_attr(feature = "ts", ts(export))]
13026pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13027    #[doc = "High level gimbal manager flags to use."]
13028    pub flags: GimbalManagerFlags,
13029    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13031    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13032    pub q: [f32; 4],
13033    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13034    pub angular_velocity_x: f32,
13035    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13036    pub angular_velocity_y: f32,
13037    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13038    pub angular_velocity_z: f32,
13039    #[doc = "System ID"]
13040    pub target_system: u8,
13041    #[doc = "Component ID"]
13042    pub target_component: u8,
13043    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13044    pub gimbal_device_id: u8,
13045}
13046impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13047    pub const ENCODED_LEN: usize = 35usize;
13048    pub const DEFAULT: Self = Self {
13049        flags: GimbalManagerFlags::DEFAULT,
13050        q: [0.0_f32; 4usize],
13051        angular_velocity_x: 0.0_f32,
13052        angular_velocity_y: 0.0_f32,
13053        angular_velocity_z: 0.0_f32,
13054        target_system: 0_u8,
13055        target_component: 0_u8,
13056        gimbal_device_id: 0_u8,
13057    };
13058    #[cfg(feature = "arbitrary")]
13059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13060        use arbitrary::{Arbitrary, Unstructured};
13061        let mut buf = [0u8; 1024];
13062        rng.fill_bytes(&mut buf);
13063        let mut unstructured = Unstructured::new(&buf);
13064        Self::arbitrary(&mut unstructured).unwrap_or_default()
13065    }
13066}
13067impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13068    fn default() -> Self {
13069        Self::DEFAULT.clone()
13070    }
13071}
13072impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13073    type Message = MavMessage;
13074    const ID: u32 = 282u32;
13075    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13076    const EXTRA_CRC: u8 = 123u8;
13077    const ENCODED_LEN: usize = 35usize;
13078    fn deser(
13079        _version: MavlinkVersion,
13080        __input: &[u8],
13081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13082        let avail_len = __input.len();
13083        let mut payload_buf = [0; Self::ENCODED_LEN];
13084        let mut buf = if avail_len < Self::ENCODED_LEN {
13085            payload_buf[0..avail_len].copy_from_slice(__input);
13086            Bytes::new(&payload_buf)
13087        } else {
13088            Bytes::new(__input)
13089        };
13090        let mut __struct = Self::default();
13091        let tmp = buf.get_u32_le();
13092        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13093            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13094                flag_type: "GimbalManagerFlags",
13095                value: tmp as u32,
13096            })?;
13097        for v in &mut __struct.q {
13098            let val = buf.get_f32_le();
13099            *v = val;
13100        }
13101        __struct.angular_velocity_x = buf.get_f32_le();
13102        __struct.angular_velocity_y = buf.get_f32_le();
13103        __struct.angular_velocity_z = buf.get_f32_le();
13104        __struct.target_system = buf.get_u8();
13105        __struct.target_component = buf.get_u8();
13106        __struct.gimbal_device_id = buf.get_u8();
13107        Ok(__struct)
13108    }
13109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13110        let mut __tmp = BytesMut::new(bytes);
13111        #[allow(clippy::absurd_extreme_comparisons)]
13112        #[allow(unused_comparisons)]
13113        if __tmp.remaining() < Self::ENCODED_LEN {
13114            panic!(
13115                "buffer is too small (need {} bytes, but got {})",
13116                Self::ENCODED_LEN,
13117                __tmp.remaining(),
13118            )
13119        }
13120        __tmp.put_u32_le(self.flags.bits());
13121        for val in &self.q {
13122            __tmp.put_f32_le(*val);
13123        }
13124        __tmp.put_f32_le(self.angular_velocity_x);
13125        __tmp.put_f32_le(self.angular_velocity_y);
13126        __tmp.put_f32_le(self.angular_velocity_z);
13127        __tmp.put_u8(self.target_system);
13128        __tmp.put_u8(self.target_component);
13129        __tmp.put_u8(self.gimbal_device_id);
13130        if matches!(version, MavlinkVersion::V2) {
13131            let len = __tmp.len();
13132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13133        } else {
13134            __tmp.len()
13135        }
13136    }
13137}
13138#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13139#[doc = ""]
13140#[doc = "ID: 288"]
13141#[derive(Debug, Clone, PartialEq)]
13142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13144#[cfg_attr(feature = "ts", derive(TS))]
13145#[cfg_attr(feature = "ts", ts(export))]
13146pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13147    #[doc = "High level gimbal manager flags."]
13148    pub flags: GimbalManagerFlags,
13149    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13150    pub pitch: f32,
13151    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13152    pub yaw: f32,
13153    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13154    pub pitch_rate: f32,
13155    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13156    pub yaw_rate: f32,
13157    #[doc = "System ID"]
13158    pub target_system: u8,
13159    #[doc = "Component ID"]
13160    pub target_component: u8,
13161    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13162    pub gimbal_device_id: u8,
13163}
13164impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13165    pub const ENCODED_LEN: usize = 23usize;
13166    pub const DEFAULT: Self = Self {
13167        flags: GimbalManagerFlags::DEFAULT,
13168        pitch: 0.0_f32,
13169        yaw: 0.0_f32,
13170        pitch_rate: 0.0_f32,
13171        yaw_rate: 0.0_f32,
13172        target_system: 0_u8,
13173        target_component: 0_u8,
13174        gimbal_device_id: 0_u8,
13175    };
13176    #[cfg(feature = "arbitrary")]
13177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13178        use arbitrary::{Arbitrary, Unstructured};
13179        let mut buf = [0u8; 1024];
13180        rng.fill_bytes(&mut buf);
13181        let mut unstructured = Unstructured::new(&buf);
13182        Self::arbitrary(&mut unstructured).unwrap_or_default()
13183    }
13184}
13185impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13186    fn default() -> Self {
13187        Self::DEFAULT.clone()
13188    }
13189}
13190impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13191    type Message = MavMessage;
13192    const ID: u32 = 288u32;
13193    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13194    const EXTRA_CRC: u8 = 20u8;
13195    const ENCODED_LEN: usize = 23usize;
13196    fn deser(
13197        _version: MavlinkVersion,
13198        __input: &[u8],
13199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13200        let avail_len = __input.len();
13201        let mut payload_buf = [0; Self::ENCODED_LEN];
13202        let mut buf = if avail_len < Self::ENCODED_LEN {
13203            payload_buf[0..avail_len].copy_from_slice(__input);
13204            Bytes::new(&payload_buf)
13205        } else {
13206            Bytes::new(__input)
13207        };
13208        let mut __struct = Self::default();
13209        let tmp = buf.get_u32_le();
13210        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13211            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13212                flag_type: "GimbalManagerFlags",
13213                value: tmp as u32,
13214            })?;
13215        __struct.pitch = buf.get_f32_le();
13216        __struct.yaw = buf.get_f32_le();
13217        __struct.pitch_rate = buf.get_f32_le();
13218        __struct.yaw_rate = buf.get_f32_le();
13219        __struct.target_system = buf.get_u8();
13220        __struct.target_component = buf.get_u8();
13221        __struct.gimbal_device_id = buf.get_u8();
13222        Ok(__struct)
13223    }
13224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13225        let mut __tmp = BytesMut::new(bytes);
13226        #[allow(clippy::absurd_extreme_comparisons)]
13227        #[allow(unused_comparisons)]
13228        if __tmp.remaining() < Self::ENCODED_LEN {
13229            panic!(
13230                "buffer is too small (need {} bytes, but got {})",
13231                Self::ENCODED_LEN,
13232                __tmp.remaining(),
13233            )
13234        }
13235        __tmp.put_u32_le(self.flags.bits());
13236        __tmp.put_f32_le(self.pitch);
13237        __tmp.put_f32_le(self.yaw);
13238        __tmp.put_f32_le(self.pitch_rate);
13239        __tmp.put_f32_le(self.yaw_rate);
13240        __tmp.put_u8(self.target_system);
13241        __tmp.put_u8(self.target_component);
13242        __tmp.put_u8(self.gimbal_device_id);
13243        if matches!(version, MavlinkVersion::V2) {
13244            let len = __tmp.len();
13245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13246        } else {
13247            __tmp.len()
13248        }
13249    }
13250}
13251#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13252#[doc = ""]
13253#[doc = "ID: 287"]
13254#[derive(Debug, Clone, PartialEq)]
13255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13257#[cfg_attr(feature = "ts", derive(TS))]
13258#[cfg_attr(feature = "ts", ts(export))]
13259pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13260    #[doc = "High level gimbal manager flags to use."]
13261    pub flags: GimbalManagerFlags,
13262    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13263    pub pitch: f32,
13264    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13265    pub yaw: f32,
13266    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13267    pub pitch_rate: f32,
13268    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13269    pub yaw_rate: f32,
13270    #[doc = "System ID"]
13271    pub target_system: u8,
13272    #[doc = "Component ID"]
13273    pub target_component: u8,
13274    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13275    pub gimbal_device_id: u8,
13276}
13277impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13278    pub const ENCODED_LEN: usize = 23usize;
13279    pub const DEFAULT: Self = Self {
13280        flags: GimbalManagerFlags::DEFAULT,
13281        pitch: 0.0_f32,
13282        yaw: 0.0_f32,
13283        pitch_rate: 0.0_f32,
13284        yaw_rate: 0.0_f32,
13285        target_system: 0_u8,
13286        target_component: 0_u8,
13287        gimbal_device_id: 0_u8,
13288    };
13289    #[cfg(feature = "arbitrary")]
13290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13291        use arbitrary::{Arbitrary, Unstructured};
13292        let mut buf = [0u8; 1024];
13293        rng.fill_bytes(&mut buf);
13294        let mut unstructured = Unstructured::new(&buf);
13295        Self::arbitrary(&mut unstructured).unwrap_or_default()
13296    }
13297}
13298impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13299    fn default() -> Self {
13300        Self::DEFAULT.clone()
13301    }
13302}
13303impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13304    type Message = MavMessage;
13305    const ID: u32 = 287u32;
13306    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13307    const EXTRA_CRC: u8 = 1u8;
13308    const ENCODED_LEN: usize = 23usize;
13309    fn deser(
13310        _version: MavlinkVersion,
13311        __input: &[u8],
13312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13313        let avail_len = __input.len();
13314        let mut payload_buf = [0; Self::ENCODED_LEN];
13315        let mut buf = if avail_len < Self::ENCODED_LEN {
13316            payload_buf[0..avail_len].copy_from_slice(__input);
13317            Bytes::new(&payload_buf)
13318        } else {
13319            Bytes::new(__input)
13320        };
13321        let mut __struct = Self::default();
13322        let tmp = buf.get_u32_le();
13323        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13324            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13325                flag_type: "GimbalManagerFlags",
13326                value: tmp as u32,
13327            })?;
13328        __struct.pitch = buf.get_f32_le();
13329        __struct.yaw = buf.get_f32_le();
13330        __struct.pitch_rate = buf.get_f32_le();
13331        __struct.yaw_rate = buf.get_f32_le();
13332        __struct.target_system = buf.get_u8();
13333        __struct.target_component = buf.get_u8();
13334        __struct.gimbal_device_id = buf.get_u8();
13335        Ok(__struct)
13336    }
13337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13338        let mut __tmp = BytesMut::new(bytes);
13339        #[allow(clippy::absurd_extreme_comparisons)]
13340        #[allow(unused_comparisons)]
13341        if __tmp.remaining() < Self::ENCODED_LEN {
13342            panic!(
13343                "buffer is too small (need {} bytes, but got {})",
13344                Self::ENCODED_LEN,
13345                __tmp.remaining(),
13346            )
13347        }
13348        __tmp.put_u32_le(self.flags.bits());
13349        __tmp.put_f32_le(self.pitch);
13350        __tmp.put_f32_le(self.yaw);
13351        __tmp.put_f32_le(self.pitch_rate);
13352        __tmp.put_f32_le(self.yaw_rate);
13353        __tmp.put_u8(self.target_system);
13354        __tmp.put_u8(self.target_component);
13355        __tmp.put_u8(self.gimbal_device_id);
13356        if matches!(version, MavlinkVersion::V2) {
13357            let len = __tmp.len();
13358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13359        } else {
13360            __tmp.len()
13361        }
13362    }
13363}
13364#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13365#[doc = ""]
13366#[doc = "ID: 281"]
13367#[derive(Debug, Clone, PartialEq)]
13368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13370#[cfg_attr(feature = "ts", derive(TS))]
13371#[cfg_attr(feature = "ts", ts(export))]
13372pub struct GIMBAL_MANAGER_STATUS_DATA {
13373    #[doc = "Timestamp (time since system boot)."]
13374    pub time_boot_ms: u32,
13375    #[doc = "High level gimbal manager flags currently applied."]
13376    pub flags: GimbalManagerFlags,
13377    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13378    pub gimbal_device_id: u8,
13379    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13380    pub primary_control_sysid: u8,
13381    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13382    pub primary_control_compid: u8,
13383    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13384    pub secondary_control_sysid: u8,
13385    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13386    pub secondary_control_compid: u8,
13387}
13388impl GIMBAL_MANAGER_STATUS_DATA {
13389    pub const ENCODED_LEN: usize = 13usize;
13390    pub const DEFAULT: Self = Self {
13391        time_boot_ms: 0_u32,
13392        flags: GimbalManagerFlags::DEFAULT,
13393        gimbal_device_id: 0_u8,
13394        primary_control_sysid: 0_u8,
13395        primary_control_compid: 0_u8,
13396        secondary_control_sysid: 0_u8,
13397        secondary_control_compid: 0_u8,
13398    };
13399    #[cfg(feature = "arbitrary")]
13400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13401        use arbitrary::{Arbitrary, Unstructured};
13402        let mut buf = [0u8; 1024];
13403        rng.fill_bytes(&mut buf);
13404        let mut unstructured = Unstructured::new(&buf);
13405        Self::arbitrary(&mut unstructured).unwrap_or_default()
13406    }
13407}
13408impl Default for GIMBAL_MANAGER_STATUS_DATA {
13409    fn default() -> Self {
13410        Self::DEFAULT.clone()
13411    }
13412}
13413impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13414    type Message = MavMessage;
13415    const ID: u32 = 281u32;
13416    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13417    const EXTRA_CRC: u8 = 48u8;
13418    const ENCODED_LEN: usize = 13usize;
13419    fn deser(
13420        _version: MavlinkVersion,
13421        __input: &[u8],
13422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13423        let avail_len = __input.len();
13424        let mut payload_buf = [0; Self::ENCODED_LEN];
13425        let mut buf = if avail_len < Self::ENCODED_LEN {
13426            payload_buf[0..avail_len].copy_from_slice(__input);
13427            Bytes::new(&payload_buf)
13428        } else {
13429            Bytes::new(__input)
13430        };
13431        let mut __struct = Self::default();
13432        __struct.time_boot_ms = buf.get_u32_le();
13433        let tmp = buf.get_u32_le();
13434        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13435            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13436                flag_type: "GimbalManagerFlags",
13437                value: tmp as u32,
13438            })?;
13439        __struct.gimbal_device_id = buf.get_u8();
13440        __struct.primary_control_sysid = buf.get_u8();
13441        __struct.primary_control_compid = buf.get_u8();
13442        __struct.secondary_control_sysid = buf.get_u8();
13443        __struct.secondary_control_compid = buf.get_u8();
13444        Ok(__struct)
13445    }
13446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13447        let mut __tmp = BytesMut::new(bytes);
13448        #[allow(clippy::absurd_extreme_comparisons)]
13449        #[allow(unused_comparisons)]
13450        if __tmp.remaining() < Self::ENCODED_LEN {
13451            panic!(
13452                "buffer is too small (need {} bytes, but got {})",
13453                Self::ENCODED_LEN,
13454                __tmp.remaining(),
13455            )
13456        }
13457        __tmp.put_u32_le(self.time_boot_ms);
13458        __tmp.put_u32_le(self.flags.bits());
13459        __tmp.put_u8(self.gimbal_device_id);
13460        __tmp.put_u8(self.primary_control_sysid);
13461        __tmp.put_u8(self.primary_control_compid);
13462        __tmp.put_u8(self.secondary_control_sysid);
13463        __tmp.put_u8(self.secondary_control_compid);
13464        if matches!(version, MavlinkVersion::V2) {
13465            let len = __tmp.len();
13466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13467        } else {
13468            __tmp.len()
13469        }
13470    }
13471}
13472#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13473#[doc = ""]
13474#[doc = "ID: 33"]
13475#[derive(Debug, Clone, PartialEq)]
13476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13478#[cfg_attr(feature = "ts", derive(TS))]
13479#[cfg_attr(feature = "ts", ts(export))]
13480pub struct GLOBAL_POSITION_INT_DATA {
13481    #[doc = "Timestamp (time since system boot)."]
13482    pub time_boot_ms: u32,
13483    #[doc = "Latitude, expressed"]
13484    pub lat: i32,
13485    #[doc = "Longitude, expressed"]
13486    pub lon: i32,
13487    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13488    pub alt: i32,
13489    #[doc = "Altitude above home"]
13490    pub relative_alt: i32,
13491    #[doc = "Ground X Speed (Latitude, positive north)"]
13492    pub vx: i16,
13493    #[doc = "Ground Y Speed (Longitude, positive east)"]
13494    pub vy: i16,
13495    #[doc = "Ground Z Speed (Altitude, positive down)"]
13496    pub vz: i16,
13497    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13498    pub hdg: u16,
13499}
13500impl GLOBAL_POSITION_INT_DATA {
13501    pub const ENCODED_LEN: usize = 28usize;
13502    pub const DEFAULT: Self = Self {
13503        time_boot_ms: 0_u32,
13504        lat: 0_i32,
13505        lon: 0_i32,
13506        alt: 0_i32,
13507        relative_alt: 0_i32,
13508        vx: 0_i16,
13509        vy: 0_i16,
13510        vz: 0_i16,
13511        hdg: 0_u16,
13512    };
13513    #[cfg(feature = "arbitrary")]
13514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13515        use arbitrary::{Arbitrary, Unstructured};
13516        let mut buf = [0u8; 1024];
13517        rng.fill_bytes(&mut buf);
13518        let mut unstructured = Unstructured::new(&buf);
13519        Self::arbitrary(&mut unstructured).unwrap_or_default()
13520    }
13521}
13522impl Default for GLOBAL_POSITION_INT_DATA {
13523    fn default() -> Self {
13524        Self::DEFAULT.clone()
13525    }
13526}
13527impl MessageData for GLOBAL_POSITION_INT_DATA {
13528    type Message = MavMessage;
13529    const ID: u32 = 33u32;
13530    const NAME: &'static str = "GLOBAL_POSITION_INT";
13531    const EXTRA_CRC: u8 = 104u8;
13532    const ENCODED_LEN: usize = 28usize;
13533    fn deser(
13534        _version: MavlinkVersion,
13535        __input: &[u8],
13536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13537        let avail_len = __input.len();
13538        let mut payload_buf = [0; Self::ENCODED_LEN];
13539        let mut buf = if avail_len < Self::ENCODED_LEN {
13540            payload_buf[0..avail_len].copy_from_slice(__input);
13541            Bytes::new(&payload_buf)
13542        } else {
13543            Bytes::new(__input)
13544        };
13545        let mut __struct = Self::default();
13546        __struct.time_boot_ms = buf.get_u32_le();
13547        __struct.lat = buf.get_i32_le();
13548        __struct.lon = buf.get_i32_le();
13549        __struct.alt = buf.get_i32_le();
13550        __struct.relative_alt = buf.get_i32_le();
13551        __struct.vx = buf.get_i16_le();
13552        __struct.vy = buf.get_i16_le();
13553        __struct.vz = buf.get_i16_le();
13554        __struct.hdg = buf.get_u16_le();
13555        Ok(__struct)
13556    }
13557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13558        let mut __tmp = BytesMut::new(bytes);
13559        #[allow(clippy::absurd_extreme_comparisons)]
13560        #[allow(unused_comparisons)]
13561        if __tmp.remaining() < Self::ENCODED_LEN {
13562            panic!(
13563                "buffer is too small (need {} bytes, but got {})",
13564                Self::ENCODED_LEN,
13565                __tmp.remaining(),
13566            )
13567        }
13568        __tmp.put_u32_le(self.time_boot_ms);
13569        __tmp.put_i32_le(self.lat);
13570        __tmp.put_i32_le(self.lon);
13571        __tmp.put_i32_le(self.alt);
13572        __tmp.put_i32_le(self.relative_alt);
13573        __tmp.put_i16_le(self.vx);
13574        __tmp.put_i16_le(self.vy);
13575        __tmp.put_i16_le(self.vz);
13576        __tmp.put_u16_le(self.hdg);
13577        if matches!(version, MavlinkVersion::V2) {
13578            let len = __tmp.len();
13579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13580        } else {
13581            __tmp.len()
13582        }
13583    }
13584}
13585#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13586#[doc = ""]
13587#[doc = "ID: 63"]
13588#[derive(Debug, Clone, PartialEq)]
13589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13591#[cfg_attr(feature = "ts", derive(TS))]
13592#[cfg_attr(feature = "ts", ts(export))]
13593pub struct GLOBAL_POSITION_INT_COV_DATA {
13594    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13595    pub time_usec: u64,
13596    #[doc = "Latitude"]
13597    pub lat: i32,
13598    #[doc = "Longitude"]
13599    pub lon: i32,
13600    #[doc = "Altitude in meters above MSL"]
13601    pub alt: i32,
13602    #[doc = "Altitude above ground"]
13603    pub relative_alt: i32,
13604    #[doc = "Ground X Speed (Latitude)"]
13605    pub vx: f32,
13606    #[doc = "Ground Y Speed (Longitude)"]
13607    pub vy: f32,
13608    #[doc = "Ground Z Speed (Altitude)"]
13609    pub vz: f32,
13610    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13613    pub covariance: [f32; 36],
13614    #[doc = "Class id of the estimator this estimate originated from."]
13615    pub estimator_type: MavEstimatorType,
13616}
13617impl GLOBAL_POSITION_INT_COV_DATA {
13618    pub const ENCODED_LEN: usize = 181usize;
13619    pub const DEFAULT: Self = Self {
13620        time_usec: 0_u64,
13621        lat: 0_i32,
13622        lon: 0_i32,
13623        alt: 0_i32,
13624        relative_alt: 0_i32,
13625        vx: 0.0_f32,
13626        vy: 0.0_f32,
13627        vz: 0.0_f32,
13628        covariance: [0.0_f32; 36usize],
13629        estimator_type: MavEstimatorType::DEFAULT,
13630    };
13631    #[cfg(feature = "arbitrary")]
13632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13633        use arbitrary::{Arbitrary, Unstructured};
13634        let mut buf = [0u8; 1024];
13635        rng.fill_bytes(&mut buf);
13636        let mut unstructured = Unstructured::new(&buf);
13637        Self::arbitrary(&mut unstructured).unwrap_or_default()
13638    }
13639}
13640impl Default for GLOBAL_POSITION_INT_COV_DATA {
13641    fn default() -> Self {
13642        Self::DEFAULT.clone()
13643    }
13644}
13645impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13646    type Message = MavMessage;
13647    const ID: u32 = 63u32;
13648    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13649    const EXTRA_CRC: u8 = 119u8;
13650    const ENCODED_LEN: usize = 181usize;
13651    fn deser(
13652        _version: MavlinkVersion,
13653        __input: &[u8],
13654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13655        let avail_len = __input.len();
13656        let mut payload_buf = [0; Self::ENCODED_LEN];
13657        let mut buf = if avail_len < Self::ENCODED_LEN {
13658            payload_buf[0..avail_len].copy_from_slice(__input);
13659            Bytes::new(&payload_buf)
13660        } else {
13661            Bytes::new(__input)
13662        };
13663        let mut __struct = Self::default();
13664        __struct.time_usec = buf.get_u64_le();
13665        __struct.lat = buf.get_i32_le();
13666        __struct.lon = buf.get_i32_le();
13667        __struct.alt = buf.get_i32_le();
13668        __struct.relative_alt = buf.get_i32_le();
13669        __struct.vx = buf.get_f32_le();
13670        __struct.vy = buf.get_f32_le();
13671        __struct.vz = buf.get_f32_le();
13672        for v in &mut __struct.covariance {
13673            let val = buf.get_f32_le();
13674            *v = val;
13675        }
13676        let tmp = buf.get_u8();
13677        __struct.estimator_type =
13678            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13679                enum_type: "MavEstimatorType",
13680                value: tmp as u32,
13681            })?;
13682        Ok(__struct)
13683    }
13684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13685        let mut __tmp = BytesMut::new(bytes);
13686        #[allow(clippy::absurd_extreme_comparisons)]
13687        #[allow(unused_comparisons)]
13688        if __tmp.remaining() < Self::ENCODED_LEN {
13689            panic!(
13690                "buffer is too small (need {} bytes, but got {})",
13691                Self::ENCODED_LEN,
13692                __tmp.remaining(),
13693            )
13694        }
13695        __tmp.put_u64_le(self.time_usec);
13696        __tmp.put_i32_le(self.lat);
13697        __tmp.put_i32_le(self.lon);
13698        __tmp.put_i32_le(self.alt);
13699        __tmp.put_i32_le(self.relative_alt);
13700        __tmp.put_f32_le(self.vx);
13701        __tmp.put_f32_le(self.vy);
13702        __tmp.put_f32_le(self.vz);
13703        for val in &self.covariance {
13704            __tmp.put_f32_le(*val);
13705        }
13706        __tmp.put_u8(self.estimator_type as u8);
13707        if matches!(version, MavlinkVersion::V2) {
13708            let len = __tmp.len();
13709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13710        } else {
13711            __tmp.len()
13712        }
13713    }
13714}
13715#[doc = "Global position/attitude estimate from a vision source."]
13716#[doc = ""]
13717#[doc = "ID: 101"]
13718#[derive(Debug, Clone, PartialEq)]
13719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13721#[cfg_attr(feature = "ts", derive(TS))]
13722#[cfg_attr(feature = "ts", ts(export))]
13723pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13724    #[doc = "Timestamp (UNIX time or since system boot)"]
13725    pub usec: u64,
13726    #[doc = "Global X position"]
13727    pub x: f32,
13728    #[doc = "Global Y position"]
13729    pub y: f32,
13730    #[doc = "Global Z position"]
13731    pub z: f32,
13732    #[doc = "Roll angle"]
13733    pub roll: f32,
13734    #[doc = "Pitch angle"]
13735    pub pitch: f32,
13736    #[doc = "Yaw angle"]
13737    pub yaw: f32,
13738    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13739    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13742    pub covariance: [f32; 21],
13743    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13744    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13745    pub reset_counter: u8,
13746}
13747impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13748    pub const ENCODED_LEN: usize = 117usize;
13749    pub const DEFAULT: Self = Self {
13750        usec: 0_u64,
13751        x: 0.0_f32,
13752        y: 0.0_f32,
13753        z: 0.0_f32,
13754        roll: 0.0_f32,
13755        pitch: 0.0_f32,
13756        yaw: 0.0_f32,
13757        covariance: [0.0_f32; 21usize],
13758        reset_counter: 0_u8,
13759    };
13760    #[cfg(feature = "arbitrary")]
13761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13762        use arbitrary::{Arbitrary, Unstructured};
13763        let mut buf = [0u8; 1024];
13764        rng.fill_bytes(&mut buf);
13765        let mut unstructured = Unstructured::new(&buf);
13766        Self::arbitrary(&mut unstructured).unwrap_or_default()
13767    }
13768}
13769impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13770    fn default() -> Self {
13771        Self::DEFAULT.clone()
13772    }
13773}
13774impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13775    type Message = MavMessage;
13776    const ID: u32 = 101u32;
13777    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13778    const EXTRA_CRC: u8 = 102u8;
13779    const ENCODED_LEN: usize = 117usize;
13780    fn deser(
13781        _version: MavlinkVersion,
13782        __input: &[u8],
13783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13784        let avail_len = __input.len();
13785        let mut payload_buf = [0; Self::ENCODED_LEN];
13786        let mut buf = if avail_len < Self::ENCODED_LEN {
13787            payload_buf[0..avail_len].copy_from_slice(__input);
13788            Bytes::new(&payload_buf)
13789        } else {
13790            Bytes::new(__input)
13791        };
13792        let mut __struct = Self::default();
13793        __struct.usec = buf.get_u64_le();
13794        __struct.x = buf.get_f32_le();
13795        __struct.y = buf.get_f32_le();
13796        __struct.z = buf.get_f32_le();
13797        __struct.roll = buf.get_f32_le();
13798        __struct.pitch = buf.get_f32_le();
13799        __struct.yaw = buf.get_f32_le();
13800        for v in &mut __struct.covariance {
13801            let val = buf.get_f32_le();
13802            *v = val;
13803        }
13804        __struct.reset_counter = buf.get_u8();
13805        Ok(__struct)
13806    }
13807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13808        let mut __tmp = BytesMut::new(bytes);
13809        #[allow(clippy::absurd_extreme_comparisons)]
13810        #[allow(unused_comparisons)]
13811        if __tmp.remaining() < Self::ENCODED_LEN {
13812            panic!(
13813                "buffer is too small (need {} bytes, but got {})",
13814                Self::ENCODED_LEN,
13815                __tmp.remaining(),
13816            )
13817        }
13818        __tmp.put_u64_le(self.usec);
13819        __tmp.put_f32_le(self.x);
13820        __tmp.put_f32_le(self.y);
13821        __tmp.put_f32_le(self.z);
13822        __tmp.put_f32_le(self.roll);
13823        __tmp.put_f32_le(self.pitch);
13824        __tmp.put_f32_le(self.yaw);
13825        if matches!(version, MavlinkVersion::V2) {
13826            for val in &self.covariance {
13827                __tmp.put_f32_le(*val);
13828            }
13829            __tmp.put_u8(self.reset_counter);
13830            let len = __tmp.len();
13831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13832        } else {
13833            __tmp.len()
13834        }
13835    }
13836}
13837#[doc = "Second GPS data."]
13838#[doc = ""]
13839#[doc = "ID: 124"]
13840#[derive(Debug, Clone, PartialEq)]
13841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13843#[cfg_attr(feature = "ts", derive(TS))]
13844#[cfg_attr(feature = "ts", ts(export))]
13845pub struct GPS2_RAW_DATA {
13846    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13847    pub time_usec: u64,
13848    #[doc = "Latitude (WGS84)"]
13849    pub lat: i32,
13850    #[doc = "Longitude (WGS84)"]
13851    pub lon: i32,
13852    #[doc = "Altitude (MSL). Positive for up."]
13853    pub alt: i32,
13854    #[doc = "Age of DGPS info"]
13855    pub dgps_age: u32,
13856    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13857    pub eph: u16,
13858    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13859    pub epv: u16,
13860    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13861    pub vel: u16,
13862    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13863    pub cog: u16,
13864    #[doc = "GPS fix type."]
13865    pub fix_type: GpsFixType,
13866    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13867    pub satellites_visible: u8,
13868    #[doc = "Number of DGPS satellites"]
13869    pub dgps_numch: u8,
13870    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13871    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13872    pub yaw: u16,
13873    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13874    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13875    pub alt_ellipsoid: i32,
13876    #[doc = "Position uncertainty."]
13877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13878    pub h_acc: u32,
13879    #[doc = "Altitude uncertainty."]
13880    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13881    pub v_acc: u32,
13882    #[doc = "Speed uncertainty."]
13883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13884    pub vel_acc: u32,
13885    #[doc = "Heading / track uncertainty"]
13886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13887    pub hdg_acc: u32,
13888}
13889impl GPS2_RAW_DATA {
13890    pub const ENCODED_LEN: usize = 57usize;
13891    pub const DEFAULT: Self = Self {
13892        time_usec: 0_u64,
13893        lat: 0_i32,
13894        lon: 0_i32,
13895        alt: 0_i32,
13896        dgps_age: 0_u32,
13897        eph: 0_u16,
13898        epv: 0_u16,
13899        vel: 0_u16,
13900        cog: 0_u16,
13901        fix_type: GpsFixType::DEFAULT,
13902        satellites_visible: 0_u8,
13903        dgps_numch: 0_u8,
13904        yaw: 0_u16,
13905        alt_ellipsoid: 0_i32,
13906        h_acc: 0_u32,
13907        v_acc: 0_u32,
13908        vel_acc: 0_u32,
13909        hdg_acc: 0_u32,
13910    };
13911    #[cfg(feature = "arbitrary")]
13912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13913        use arbitrary::{Arbitrary, Unstructured};
13914        let mut buf = [0u8; 1024];
13915        rng.fill_bytes(&mut buf);
13916        let mut unstructured = Unstructured::new(&buf);
13917        Self::arbitrary(&mut unstructured).unwrap_or_default()
13918    }
13919}
13920impl Default for GPS2_RAW_DATA {
13921    fn default() -> Self {
13922        Self::DEFAULT.clone()
13923    }
13924}
13925impl MessageData for GPS2_RAW_DATA {
13926    type Message = MavMessage;
13927    const ID: u32 = 124u32;
13928    const NAME: &'static str = "GPS2_RAW";
13929    const EXTRA_CRC: u8 = 87u8;
13930    const ENCODED_LEN: usize = 57usize;
13931    fn deser(
13932        _version: MavlinkVersion,
13933        __input: &[u8],
13934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13935        let avail_len = __input.len();
13936        let mut payload_buf = [0; Self::ENCODED_LEN];
13937        let mut buf = if avail_len < Self::ENCODED_LEN {
13938            payload_buf[0..avail_len].copy_from_slice(__input);
13939            Bytes::new(&payload_buf)
13940        } else {
13941            Bytes::new(__input)
13942        };
13943        let mut __struct = Self::default();
13944        __struct.time_usec = buf.get_u64_le();
13945        __struct.lat = buf.get_i32_le();
13946        __struct.lon = buf.get_i32_le();
13947        __struct.alt = buf.get_i32_le();
13948        __struct.dgps_age = buf.get_u32_le();
13949        __struct.eph = buf.get_u16_le();
13950        __struct.epv = buf.get_u16_le();
13951        __struct.vel = buf.get_u16_le();
13952        __struct.cog = buf.get_u16_le();
13953        let tmp = buf.get_u8();
13954        __struct.fix_type =
13955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13956                enum_type: "GpsFixType",
13957                value: tmp as u32,
13958            })?;
13959        __struct.satellites_visible = buf.get_u8();
13960        __struct.dgps_numch = buf.get_u8();
13961        __struct.yaw = buf.get_u16_le();
13962        __struct.alt_ellipsoid = buf.get_i32_le();
13963        __struct.h_acc = buf.get_u32_le();
13964        __struct.v_acc = buf.get_u32_le();
13965        __struct.vel_acc = buf.get_u32_le();
13966        __struct.hdg_acc = buf.get_u32_le();
13967        Ok(__struct)
13968    }
13969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13970        let mut __tmp = BytesMut::new(bytes);
13971        #[allow(clippy::absurd_extreme_comparisons)]
13972        #[allow(unused_comparisons)]
13973        if __tmp.remaining() < Self::ENCODED_LEN {
13974            panic!(
13975                "buffer is too small (need {} bytes, but got {})",
13976                Self::ENCODED_LEN,
13977                __tmp.remaining(),
13978            )
13979        }
13980        __tmp.put_u64_le(self.time_usec);
13981        __tmp.put_i32_le(self.lat);
13982        __tmp.put_i32_le(self.lon);
13983        __tmp.put_i32_le(self.alt);
13984        __tmp.put_u32_le(self.dgps_age);
13985        __tmp.put_u16_le(self.eph);
13986        __tmp.put_u16_le(self.epv);
13987        __tmp.put_u16_le(self.vel);
13988        __tmp.put_u16_le(self.cog);
13989        __tmp.put_u8(self.fix_type as u8);
13990        __tmp.put_u8(self.satellites_visible);
13991        __tmp.put_u8(self.dgps_numch);
13992        if matches!(version, MavlinkVersion::V2) {
13993            __tmp.put_u16_le(self.yaw);
13994            __tmp.put_i32_le(self.alt_ellipsoid);
13995            __tmp.put_u32_le(self.h_acc);
13996            __tmp.put_u32_le(self.v_acc);
13997            __tmp.put_u32_le(self.vel_acc);
13998            __tmp.put_u32_le(self.hdg_acc);
13999            let len = __tmp.len();
14000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14001        } else {
14002            __tmp.len()
14003        }
14004    }
14005}
14006#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14007#[doc = ""]
14008#[doc = "ID: 128"]
14009#[derive(Debug, Clone, PartialEq)]
14010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14012#[cfg_attr(feature = "ts", derive(TS))]
14013#[cfg_attr(feature = "ts", ts(export))]
14014pub struct GPS2_RTK_DATA {
14015    #[doc = "Time since boot of last baseline message received."]
14016    pub time_last_baseline_ms: u32,
14017    #[doc = "GPS Time of Week of last baseline"]
14018    pub tow: u32,
14019    #[doc = "Current baseline in ECEF x or NED north component."]
14020    pub baseline_a_mm: i32,
14021    #[doc = "Current baseline in ECEF y or NED east component."]
14022    pub baseline_b_mm: i32,
14023    #[doc = "Current baseline in ECEF z or NED down component."]
14024    pub baseline_c_mm: i32,
14025    #[doc = "Current estimate of baseline accuracy."]
14026    pub accuracy: u32,
14027    #[doc = "Current number of integer ambiguity hypotheses."]
14028    pub iar_num_hypotheses: i32,
14029    #[doc = "GPS Week Number of last baseline"]
14030    pub wn: u16,
14031    #[doc = "Identification of connected RTK receiver."]
14032    pub rtk_receiver_id: u8,
14033    #[doc = "GPS-specific health report for RTK data."]
14034    pub rtk_health: u8,
14035    #[doc = "Rate of baseline messages being received by GPS"]
14036    pub rtk_rate: u8,
14037    #[doc = "Current number of sats used for RTK calculation."]
14038    pub nsats: u8,
14039    #[doc = "Coordinate system of baseline"]
14040    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14041}
14042impl GPS2_RTK_DATA {
14043    pub const ENCODED_LEN: usize = 35usize;
14044    pub const DEFAULT: Self = Self {
14045        time_last_baseline_ms: 0_u32,
14046        tow: 0_u32,
14047        baseline_a_mm: 0_i32,
14048        baseline_b_mm: 0_i32,
14049        baseline_c_mm: 0_i32,
14050        accuracy: 0_u32,
14051        iar_num_hypotheses: 0_i32,
14052        wn: 0_u16,
14053        rtk_receiver_id: 0_u8,
14054        rtk_health: 0_u8,
14055        rtk_rate: 0_u8,
14056        nsats: 0_u8,
14057        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14058    };
14059    #[cfg(feature = "arbitrary")]
14060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14061        use arbitrary::{Arbitrary, Unstructured};
14062        let mut buf = [0u8; 1024];
14063        rng.fill_bytes(&mut buf);
14064        let mut unstructured = Unstructured::new(&buf);
14065        Self::arbitrary(&mut unstructured).unwrap_or_default()
14066    }
14067}
14068impl Default for GPS2_RTK_DATA {
14069    fn default() -> Self {
14070        Self::DEFAULT.clone()
14071    }
14072}
14073impl MessageData for GPS2_RTK_DATA {
14074    type Message = MavMessage;
14075    const ID: u32 = 128u32;
14076    const NAME: &'static str = "GPS2_RTK";
14077    const EXTRA_CRC: u8 = 226u8;
14078    const ENCODED_LEN: usize = 35usize;
14079    fn deser(
14080        _version: MavlinkVersion,
14081        __input: &[u8],
14082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14083        let avail_len = __input.len();
14084        let mut payload_buf = [0; Self::ENCODED_LEN];
14085        let mut buf = if avail_len < Self::ENCODED_LEN {
14086            payload_buf[0..avail_len].copy_from_slice(__input);
14087            Bytes::new(&payload_buf)
14088        } else {
14089            Bytes::new(__input)
14090        };
14091        let mut __struct = Self::default();
14092        __struct.time_last_baseline_ms = buf.get_u32_le();
14093        __struct.tow = buf.get_u32_le();
14094        __struct.baseline_a_mm = buf.get_i32_le();
14095        __struct.baseline_b_mm = buf.get_i32_le();
14096        __struct.baseline_c_mm = buf.get_i32_le();
14097        __struct.accuracy = buf.get_u32_le();
14098        __struct.iar_num_hypotheses = buf.get_i32_le();
14099        __struct.wn = buf.get_u16_le();
14100        __struct.rtk_receiver_id = buf.get_u8();
14101        __struct.rtk_health = buf.get_u8();
14102        __struct.rtk_rate = buf.get_u8();
14103        __struct.nsats = buf.get_u8();
14104        let tmp = buf.get_u8();
14105        __struct.baseline_coords_type =
14106            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14107                enum_type: "RtkBaselineCoordinateSystem",
14108                value: tmp as u32,
14109            })?;
14110        Ok(__struct)
14111    }
14112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14113        let mut __tmp = BytesMut::new(bytes);
14114        #[allow(clippy::absurd_extreme_comparisons)]
14115        #[allow(unused_comparisons)]
14116        if __tmp.remaining() < Self::ENCODED_LEN {
14117            panic!(
14118                "buffer is too small (need {} bytes, but got {})",
14119                Self::ENCODED_LEN,
14120                __tmp.remaining(),
14121            )
14122        }
14123        __tmp.put_u32_le(self.time_last_baseline_ms);
14124        __tmp.put_u32_le(self.tow);
14125        __tmp.put_i32_le(self.baseline_a_mm);
14126        __tmp.put_i32_le(self.baseline_b_mm);
14127        __tmp.put_i32_le(self.baseline_c_mm);
14128        __tmp.put_u32_le(self.accuracy);
14129        __tmp.put_i32_le(self.iar_num_hypotheses);
14130        __tmp.put_u16_le(self.wn);
14131        __tmp.put_u8(self.rtk_receiver_id);
14132        __tmp.put_u8(self.rtk_health);
14133        __tmp.put_u8(self.rtk_rate);
14134        __tmp.put_u8(self.nsats);
14135        __tmp.put_u8(self.baseline_coords_type as u8);
14136        if matches!(version, MavlinkVersion::V2) {
14137            let len = __tmp.len();
14138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14139        } else {
14140            __tmp.len()
14141        }
14142    }
14143}
14144#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14145#[doc = ""]
14146#[doc = "ID: 49"]
14147#[derive(Debug, Clone, PartialEq)]
14148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14150#[cfg_attr(feature = "ts", derive(TS))]
14151#[cfg_attr(feature = "ts", ts(export))]
14152pub struct GPS_GLOBAL_ORIGIN_DATA {
14153    #[doc = "Latitude (WGS84)"]
14154    pub latitude: i32,
14155    #[doc = "Longitude (WGS84)"]
14156    pub longitude: i32,
14157    #[doc = "Altitude (MSL). Positive for up."]
14158    pub altitude: i32,
14159    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14160    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14161    pub time_usec: u64,
14162}
14163impl GPS_GLOBAL_ORIGIN_DATA {
14164    pub const ENCODED_LEN: usize = 20usize;
14165    pub const DEFAULT: Self = Self {
14166        latitude: 0_i32,
14167        longitude: 0_i32,
14168        altitude: 0_i32,
14169        time_usec: 0_u64,
14170    };
14171    #[cfg(feature = "arbitrary")]
14172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14173        use arbitrary::{Arbitrary, Unstructured};
14174        let mut buf = [0u8; 1024];
14175        rng.fill_bytes(&mut buf);
14176        let mut unstructured = Unstructured::new(&buf);
14177        Self::arbitrary(&mut unstructured).unwrap_or_default()
14178    }
14179}
14180impl Default for GPS_GLOBAL_ORIGIN_DATA {
14181    fn default() -> Self {
14182        Self::DEFAULT.clone()
14183    }
14184}
14185impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14186    type Message = MavMessage;
14187    const ID: u32 = 49u32;
14188    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14189    const EXTRA_CRC: u8 = 39u8;
14190    const ENCODED_LEN: usize = 20usize;
14191    fn deser(
14192        _version: MavlinkVersion,
14193        __input: &[u8],
14194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14195        let avail_len = __input.len();
14196        let mut payload_buf = [0; Self::ENCODED_LEN];
14197        let mut buf = if avail_len < Self::ENCODED_LEN {
14198            payload_buf[0..avail_len].copy_from_slice(__input);
14199            Bytes::new(&payload_buf)
14200        } else {
14201            Bytes::new(__input)
14202        };
14203        let mut __struct = Self::default();
14204        __struct.latitude = buf.get_i32_le();
14205        __struct.longitude = buf.get_i32_le();
14206        __struct.altitude = buf.get_i32_le();
14207        __struct.time_usec = buf.get_u64_le();
14208        Ok(__struct)
14209    }
14210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14211        let mut __tmp = BytesMut::new(bytes);
14212        #[allow(clippy::absurd_extreme_comparisons)]
14213        #[allow(unused_comparisons)]
14214        if __tmp.remaining() < Self::ENCODED_LEN {
14215            panic!(
14216                "buffer is too small (need {} bytes, but got {})",
14217                Self::ENCODED_LEN,
14218                __tmp.remaining(),
14219            )
14220        }
14221        __tmp.put_i32_le(self.latitude);
14222        __tmp.put_i32_le(self.longitude);
14223        __tmp.put_i32_le(self.altitude);
14224        if matches!(version, MavlinkVersion::V2) {
14225            __tmp.put_u64_le(self.time_usec);
14226            let len = __tmp.len();
14227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14228        } else {
14229            __tmp.len()
14230        }
14231    }
14232}
14233#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14234#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14235#[doc = ""]
14236#[doc = "ID: 123"]
14237#[derive(Debug, Clone, PartialEq)]
14238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14240#[cfg_attr(feature = "ts", derive(TS))]
14241#[cfg_attr(feature = "ts", ts(export))]
14242pub struct GPS_INJECT_DATA_DATA {
14243    #[doc = "System ID"]
14244    pub target_system: u8,
14245    #[doc = "Component ID"]
14246    pub target_component: u8,
14247    #[doc = "Data length"]
14248    pub len: u8,
14249    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14252    pub data: [u8; 110],
14253}
14254impl GPS_INJECT_DATA_DATA {
14255    pub const ENCODED_LEN: usize = 113usize;
14256    pub const DEFAULT: Self = Self {
14257        target_system: 0_u8,
14258        target_component: 0_u8,
14259        len: 0_u8,
14260        data: [0_u8; 110usize],
14261    };
14262    #[cfg(feature = "arbitrary")]
14263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14264        use arbitrary::{Arbitrary, Unstructured};
14265        let mut buf = [0u8; 1024];
14266        rng.fill_bytes(&mut buf);
14267        let mut unstructured = Unstructured::new(&buf);
14268        Self::arbitrary(&mut unstructured).unwrap_or_default()
14269    }
14270}
14271impl Default for GPS_INJECT_DATA_DATA {
14272    fn default() -> Self {
14273        Self::DEFAULT.clone()
14274    }
14275}
14276impl MessageData for GPS_INJECT_DATA_DATA {
14277    type Message = MavMessage;
14278    const ID: u32 = 123u32;
14279    const NAME: &'static str = "GPS_INJECT_DATA";
14280    const EXTRA_CRC: u8 = 250u8;
14281    const ENCODED_LEN: usize = 113usize;
14282    fn deser(
14283        _version: MavlinkVersion,
14284        __input: &[u8],
14285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14286        let avail_len = __input.len();
14287        let mut payload_buf = [0; Self::ENCODED_LEN];
14288        let mut buf = if avail_len < Self::ENCODED_LEN {
14289            payload_buf[0..avail_len].copy_from_slice(__input);
14290            Bytes::new(&payload_buf)
14291        } else {
14292            Bytes::new(__input)
14293        };
14294        let mut __struct = Self::default();
14295        __struct.target_system = buf.get_u8();
14296        __struct.target_component = buf.get_u8();
14297        __struct.len = buf.get_u8();
14298        for v in &mut __struct.data {
14299            let val = buf.get_u8();
14300            *v = val;
14301        }
14302        Ok(__struct)
14303    }
14304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14305        let mut __tmp = BytesMut::new(bytes);
14306        #[allow(clippy::absurd_extreme_comparisons)]
14307        #[allow(unused_comparisons)]
14308        if __tmp.remaining() < Self::ENCODED_LEN {
14309            panic!(
14310                "buffer is too small (need {} bytes, but got {})",
14311                Self::ENCODED_LEN,
14312                __tmp.remaining(),
14313            )
14314        }
14315        __tmp.put_u8(self.target_system);
14316        __tmp.put_u8(self.target_component);
14317        __tmp.put_u8(self.len);
14318        for val in &self.data {
14319            __tmp.put_u8(*val);
14320        }
14321        if matches!(version, MavlinkVersion::V2) {
14322            let len = __tmp.len();
14323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14324        } else {
14325            __tmp.len()
14326        }
14327    }
14328}
14329#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14330#[doc = ""]
14331#[doc = "ID: 232"]
14332#[derive(Debug, Clone, PartialEq)]
14333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14335#[cfg_attr(feature = "ts", derive(TS))]
14336#[cfg_attr(feature = "ts", ts(export))]
14337pub struct GPS_INPUT_DATA {
14338    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14339    pub time_usec: u64,
14340    #[doc = "GPS time (from start of GPS week)"]
14341    pub time_week_ms: u32,
14342    #[doc = "Latitude (WGS84)"]
14343    pub lat: i32,
14344    #[doc = "Longitude (WGS84)"]
14345    pub lon: i32,
14346    #[doc = "Altitude (MSL). Positive for up."]
14347    pub alt: f32,
14348    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14349    pub hdop: f32,
14350    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14351    pub vdop: f32,
14352    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14353    pub vn: f32,
14354    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14355    pub ve: f32,
14356    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14357    pub vd: f32,
14358    #[doc = "GPS speed accuracy"]
14359    pub speed_accuracy: f32,
14360    #[doc = "GPS horizontal accuracy"]
14361    pub horiz_accuracy: f32,
14362    #[doc = "GPS vertical accuracy"]
14363    pub vert_accuracy: f32,
14364    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14365    pub ignore_flags: GpsInputIgnoreFlags,
14366    #[doc = "GPS week number"]
14367    pub time_week: u16,
14368    #[doc = "ID of the GPS for multiple GPS inputs"]
14369    pub gps_id: u8,
14370    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14371    pub fix_type: u8,
14372    #[doc = "Number of satellites visible."]
14373    pub satellites_visible: u8,
14374    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14376    pub yaw: u16,
14377}
14378impl GPS_INPUT_DATA {
14379    pub const ENCODED_LEN: usize = 65usize;
14380    pub const DEFAULT: Self = Self {
14381        time_usec: 0_u64,
14382        time_week_ms: 0_u32,
14383        lat: 0_i32,
14384        lon: 0_i32,
14385        alt: 0.0_f32,
14386        hdop: 0.0_f32,
14387        vdop: 0.0_f32,
14388        vn: 0.0_f32,
14389        ve: 0.0_f32,
14390        vd: 0.0_f32,
14391        speed_accuracy: 0.0_f32,
14392        horiz_accuracy: 0.0_f32,
14393        vert_accuracy: 0.0_f32,
14394        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14395        time_week: 0_u16,
14396        gps_id: 0_u8,
14397        fix_type: 0_u8,
14398        satellites_visible: 0_u8,
14399        yaw: 0_u16,
14400    };
14401    #[cfg(feature = "arbitrary")]
14402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14403        use arbitrary::{Arbitrary, Unstructured};
14404        let mut buf = [0u8; 1024];
14405        rng.fill_bytes(&mut buf);
14406        let mut unstructured = Unstructured::new(&buf);
14407        Self::arbitrary(&mut unstructured).unwrap_or_default()
14408    }
14409}
14410impl Default for GPS_INPUT_DATA {
14411    fn default() -> Self {
14412        Self::DEFAULT.clone()
14413    }
14414}
14415impl MessageData for GPS_INPUT_DATA {
14416    type Message = MavMessage;
14417    const ID: u32 = 232u32;
14418    const NAME: &'static str = "GPS_INPUT";
14419    const EXTRA_CRC: u8 = 151u8;
14420    const ENCODED_LEN: usize = 65usize;
14421    fn deser(
14422        _version: MavlinkVersion,
14423        __input: &[u8],
14424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14425        let avail_len = __input.len();
14426        let mut payload_buf = [0; Self::ENCODED_LEN];
14427        let mut buf = if avail_len < Self::ENCODED_LEN {
14428            payload_buf[0..avail_len].copy_from_slice(__input);
14429            Bytes::new(&payload_buf)
14430        } else {
14431            Bytes::new(__input)
14432        };
14433        let mut __struct = Self::default();
14434        __struct.time_usec = buf.get_u64_le();
14435        __struct.time_week_ms = buf.get_u32_le();
14436        __struct.lat = buf.get_i32_le();
14437        __struct.lon = buf.get_i32_le();
14438        __struct.alt = buf.get_f32_le();
14439        __struct.hdop = buf.get_f32_le();
14440        __struct.vdop = buf.get_f32_le();
14441        __struct.vn = buf.get_f32_le();
14442        __struct.ve = buf.get_f32_le();
14443        __struct.vd = buf.get_f32_le();
14444        __struct.speed_accuracy = buf.get_f32_le();
14445        __struct.horiz_accuracy = buf.get_f32_le();
14446        __struct.vert_accuracy = buf.get_f32_le();
14447        let tmp = buf.get_u16_le();
14448        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14449            tmp & GpsInputIgnoreFlags::all().bits(),
14450        )
14451        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14452            flag_type: "GpsInputIgnoreFlags",
14453            value: tmp as u32,
14454        })?;
14455        __struct.time_week = buf.get_u16_le();
14456        __struct.gps_id = buf.get_u8();
14457        __struct.fix_type = buf.get_u8();
14458        __struct.satellites_visible = buf.get_u8();
14459        __struct.yaw = buf.get_u16_le();
14460        Ok(__struct)
14461    }
14462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14463        let mut __tmp = BytesMut::new(bytes);
14464        #[allow(clippy::absurd_extreme_comparisons)]
14465        #[allow(unused_comparisons)]
14466        if __tmp.remaining() < Self::ENCODED_LEN {
14467            panic!(
14468                "buffer is too small (need {} bytes, but got {})",
14469                Self::ENCODED_LEN,
14470                __tmp.remaining(),
14471            )
14472        }
14473        __tmp.put_u64_le(self.time_usec);
14474        __tmp.put_u32_le(self.time_week_ms);
14475        __tmp.put_i32_le(self.lat);
14476        __tmp.put_i32_le(self.lon);
14477        __tmp.put_f32_le(self.alt);
14478        __tmp.put_f32_le(self.hdop);
14479        __tmp.put_f32_le(self.vdop);
14480        __tmp.put_f32_le(self.vn);
14481        __tmp.put_f32_le(self.ve);
14482        __tmp.put_f32_le(self.vd);
14483        __tmp.put_f32_le(self.speed_accuracy);
14484        __tmp.put_f32_le(self.horiz_accuracy);
14485        __tmp.put_f32_le(self.vert_accuracy);
14486        __tmp.put_u16_le(self.ignore_flags.bits());
14487        __tmp.put_u16_le(self.time_week);
14488        __tmp.put_u8(self.gps_id);
14489        __tmp.put_u8(self.fix_type);
14490        __tmp.put_u8(self.satellites_visible);
14491        if matches!(version, MavlinkVersion::V2) {
14492            __tmp.put_u16_le(self.yaw);
14493            let len = __tmp.len();
14494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14495        } else {
14496            __tmp.len()
14497        }
14498    }
14499}
14500#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14501#[doc = ""]
14502#[doc = "ID: 24"]
14503#[derive(Debug, Clone, PartialEq)]
14504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14506#[cfg_attr(feature = "ts", derive(TS))]
14507#[cfg_attr(feature = "ts", ts(export))]
14508pub struct GPS_RAW_INT_DATA {
14509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14510    pub time_usec: u64,
14511    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14512    pub lat: i32,
14513    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14514    pub lon: i32,
14515    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14516    pub alt: i32,
14517    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14518    pub eph: u16,
14519    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14520    pub epv: u16,
14521    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14522    pub vel: u16,
14523    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14524    pub cog: u16,
14525    #[doc = "GPS fix type."]
14526    pub fix_type: GpsFixType,
14527    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14528    pub satellites_visible: u8,
14529    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14531    pub alt_ellipsoid: i32,
14532    #[doc = "Position uncertainty."]
14533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14534    pub h_acc: u32,
14535    #[doc = "Altitude uncertainty."]
14536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14537    pub v_acc: u32,
14538    #[doc = "Speed uncertainty."]
14539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14540    pub vel_acc: u32,
14541    #[doc = "Heading / track uncertainty"]
14542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14543    pub hdg_acc: u32,
14544    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14545    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14546    pub yaw: u16,
14547}
14548impl GPS_RAW_INT_DATA {
14549    pub const ENCODED_LEN: usize = 52usize;
14550    pub const DEFAULT: Self = Self {
14551        time_usec: 0_u64,
14552        lat: 0_i32,
14553        lon: 0_i32,
14554        alt: 0_i32,
14555        eph: 0_u16,
14556        epv: 0_u16,
14557        vel: 0_u16,
14558        cog: 0_u16,
14559        fix_type: GpsFixType::DEFAULT,
14560        satellites_visible: 0_u8,
14561        alt_ellipsoid: 0_i32,
14562        h_acc: 0_u32,
14563        v_acc: 0_u32,
14564        vel_acc: 0_u32,
14565        hdg_acc: 0_u32,
14566        yaw: 0_u16,
14567    };
14568    #[cfg(feature = "arbitrary")]
14569    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14570        use arbitrary::{Arbitrary, Unstructured};
14571        let mut buf = [0u8; 1024];
14572        rng.fill_bytes(&mut buf);
14573        let mut unstructured = Unstructured::new(&buf);
14574        Self::arbitrary(&mut unstructured).unwrap_or_default()
14575    }
14576}
14577impl Default for GPS_RAW_INT_DATA {
14578    fn default() -> Self {
14579        Self::DEFAULT.clone()
14580    }
14581}
14582impl MessageData for GPS_RAW_INT_DATA {
14583    type Message = MavMessage;
14584    const ID: u32 = 24u32;
14585    const NAME: &'static str = "GPS_RAW_INT";
14586    const EXTRA_CRC: u8 = 24u8;
14587    const ENCODED_LEN: usize = 52usize;
14588    fn deser(
14589        _version: MavlinkVersion,
14590        __input: &[u8],
14591    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14592        let avail_len = __input.len();
14593        let mut payload_buf = [0; Self::ENCODED_LEN];
14594        let mut buf = if avail_len < Self::ENCODED_LEN {
14595            payload_buf[0..avail_len].copy_from_slice(__input);
14596            Bytes::new(&payload_buf)
14597        } else {
14598            Bytes::new(__input)
14599        };
14600        let mut __struct = Self::default();
14601        __struct.time_usec = buf.get_u64_le();
14602        __struct.lat = buf.get_i32_le();
14603        __struct.lon = buf.get_i32_le();
14604        __struct.alt = buf.get_i32_le();
14605        __struct.eph = buf.get_u16_le();
14606        __struct.epv = buf.get_u16_le();
14607        __struct.vel = buf.get_u16_le();
14608        __struct.cog = buf.get_u16_le();
14609        let tmp = buf.get_u8();
14610        __struct.fix_type =
14611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14612                enum_type: "GpsFixType",
14613                value: tmp as u32,
14614            })?;
14615        __struct.satellites_visible = buf.get_u8();
14616        __struct.alt_ellipsoid = buf.get_i32_le();
14617        __struct.h_acc = buf.get_u32_le();
14618        __struct.v_acc = buf.get_u32_le();
14619        __struct.vel_acc = buf.get_u32_le();
14620        __struct.hdg_acc = buf.get_u32_le();
14621        __struct.yaw = buf.get_u16_le();
14622        Ok(__struct)
14623    }
14624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14625        let mut __tmp = BytesMut::new(bytes);
14626        #[allow(clippy::absurd_extreme_comparisons)]
14627        #[allow(unused_comparisons)]
14628        if __tmp.remaining() < Self::ENCODED_LEN {
14629            panic!(
14630                "buffer is too small (need {} bytes, but got {})",
14631                Self::ENCODED_LEN,
14632                __tmp.remaining(),
14633            )
14634        }
14635        __tmp.put_u64_le(self.time_usec);
14636        __tmp.put_i32_le(self.lat);
14637        __tmp.put_i32_le(self.lon);
14638        __tmp.put_i32_le(self.alt);
14639        __tmp.put_u16_le(self.eph);
14640        __tmp.put_u16_le(self.epv);
14641        __tmp.put_u16_le(self.vel);
14642        __tmp.put_u16_le(self.cog);
14643        __tmp.put_u8(self.fix_type as u8);
14644        __tmp.put_u8(self.satellites_visible);
14645        if matches!(version, MavlinkVersion::V2) {
14646            __tmp.put_i32_le(self.alt_ellipsoid);
14647            __tmp.put_u32_le(self.h_acc);
14648            __tmp.put_u32_le(self.v_acc);
14649            __tmp.put_u32_le(self.vel_acc);
14650            __tmp.put_u32_le(self.hdg_acc);
14651            __tmp.put_u16_le(self.yaw);
14652            let len = __tmp.len();
14653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14654        } else {
14655            __tmp.len()
14656        }
14657    }
14658}
14659#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14660#[doc = ""]
14661#[doc = "ID: 233"]
14662#[derive(Debug, Clone, PartialEq)]
14663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14665#[cfg_attr(feature = "ts", derive(TS))]
14666#[cfg_attr(feature = "ts", ts(export))]
14667pub struct GPS_RTCM_DATA_DATA {
14668    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14669    pub flags: u8,
14670    #[doc = "data length"]
14671    pub len: u8,
14672    #[doc = "RTCM message (may be fragmented)"]
14673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14675    pub data: [u8; 180],
14676}
14677impl GPS_RTCM_DATA_DATA {
14678    pub const ENCODED_LEN: usize = 182usize;
14679    pub const DEFAULT: Self = Self {
14680        flags: 0_u8,
14681        len: 0_u8,
14682        data: [0_u8; 180usize],
14683    };
14684    #[cfg(feature = "arbitrary")]
14685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14686        use arbitrary::{Arbitrary, Unstructured};
14687        let mut buf = [0u8; 1024];
14688        rng.fill_bytes(&mut buf);
14689        let mut unstructured = Unstructured::new(&buf);
14690        Self::arbitrary(&mut unstructured).unwrap_or_default()
14691    }
14692}
14693impl Default for GPS_RTCM_DATA_DATA {
14694    fn default() -> Self {
14695        Self::DEFAULT.clone()
14696    }
14697}
14698impl MessageData for GPS_RTCM_DATA_DATA {
14699    type Message = MavMessage;
14700    const ID: u32 = 233u32;
14701    const NAME: &'static str = "GPS_RTCM_DATA";
14702    const EXTRA_CRC: u8 = 35u8;
14703    const ENCODED_LEN: usize = 182usize;
14704    fn deser(
14705        _version: MavlinkVersion,
14706        __input: &[u8],
14707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14708        let avail_len = __input.len();
14709        let mut payload_buf = [0; Self::ENCODED_LEN];
14710        let mut buf = if avail_len < Self::ENCODED_LEN {
14711            payload_buf[0..avail_len].copy_from_slice(__input);
14712            Bytes::new(&payload_buf)
14713        } else {
14714            Bytes::new(__input)
14715        };
14716        let mut __struct = Self::default();
14717        __struct.flags = buf.get_u8();
14718        __struct.len = buf.get_u8();
14719        for v in &mut __struct.data {
14720            let val = buf.get_u8();
14721            *v = val;
14722        }
14723        Ok(__struct)
14724    }
14725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14726        let mut __tmp = BytesMut::new(bytes);
14727        #[allow(clippy::absurd_extreme_comparisons)]
14728        #[allow(unused_comparisons)]
14729        if __tmp.remaining() < Self::ENCODED_LEN {
14730            panic!(
14731                "buffer is too small (need {} bytes, but got {})",
14732                Self::ENCODED_LEN,
14733                __tmp.remaining(),
14734            )
14735        }
14736        __tmp.put_u8(self.flags);
14737        __tmp.put_u8(self.len);
14738        for val in &self.data {
14739            __tmp.put_u8(*val);
14740        }
14741        if matches!(version, MavlinkVersion::V2) {
14742            let len = __tmp.len();
14743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14744        } else {
14745            __tmp.len()
14746        }
14747    }
14748}
14749#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14750#[doc = ""]
14751#[doc = "ID: 127"]
14752#[derive(Debug, Clone, PartialEq)]
14753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14755#[cfg_attr(feature = "ts", derive(TS))]
14756#[cfg_attr(feature = "ts", ts(export))]
14757pub struct GPS_RTK_DATA {
14758    #[doc = "Time since boot of last baseline message received."]
14759    pub time_last_baseline_ms: u32,
14760    #[doc = "GPS Time of Week of last baseline"]
14761    pub tow: u32,
14762    #[doc = "Current baseline in ECEF x or NED north component."]
14763    pub baseline_a_mm: i32,
14764    #[doc = "Current baseline in ECEF y or NED east component."]
14765    pub baseline_b_mm: i32,
14766    #[doc = "Current baseline in ECEF z or NED down component."]
14767    pub baseline_c_mm: i32,
14768    #[doc = "Current estimate of baseline accuracy."]
14769    pub accuracy: u32,
14770    #[doc = "Current number of integer ambiguity hypotheses."]
14771    pub iar_num_hypotheses: i32,
14772    #[doc = "GPS Week Number of last baseline"]
14773    pub wn: u16,
14774    #[doc = "Identification of connected RTK receiver."]
14775    pub rtk_receiver_id: u8,
14776    #[doc = "GPS-specific health report for RTK data."]
14777    pub rtk_health: u8,
14778    #[doc = "Rate of baseline messages being received by GPS"]
14779    pub rtk_rate: u8,
14780    #[doc = "Current number of sats used for RTK calculation."]
14781    pub nsats: u8,
14782    #[doc = "Coordinate system of baseline"]
14783    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14784}
14785impl GPS_RTK_DATA {
14786    pub const ENCODED_LEN: usize = 35usize;
14787    pub const DEFAULT: Self = Self {
14788        time_last_baseline_ms: 0_u32,
14789        tow: 0_u32,
14790        baseline_a_mm: 0_i32,
14791        baseline_b_mm: 0_i32,
14792        baseline_c_mm: 0_i32,
14793        accuracy: 0_u32,
14794        iar_num_hypotheses: 0_i32,
14795        wn: 0_u16,
14796        rtk_receiver_id: 0_u8,
14797        rtk_health: 0_u8,
14798        rtk_rate: 0_u8,
14799        nsats: 0_u8,
14800        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14801    };
14802    #[cfg(feature = "arbitrary")]
14803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14804        use arbitrary::{Arbitrary, Unstructured};
14805        let mut buf = [0u8; 1024];
14806        rng.fill_bytes(&mut buf);
14807        let mut unstructured = Unstructured::new(&buf);
14808        Self::arbitrary(&mut unstructured).unwrap_or_default()
14809    }
14810}
14811impl Default for GPS_RTK_DATA {
14812    fn default() -> Self {
14813        Self::DEFAULT.clone()
14814    }
14815}
14816impl MessageData for GPS_RTK_DATA {
14817    type Message = MavMessage;
14818    const ID: u32 = 127u32;
14819    const NAME: &'static str = "GPS_RTK";
14820    const EXTRA_CRC: u8 = 25u8;
14821    const ENCODED_LEN: usize = 35usize;
14822    fn deser(
14823        _version: MavlinkVersion,
14824        __input: &[u8],
14825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14826        let avail_len = __input.len();
14827        let mut payload_buf = [0; Self::ENCODED_LEN];
14828        let mut buf = if avail_len < Self::ENCODED_LEN {
14829            payload_buf[0..avail_len].copy_from_slice(__input);
14830            Bytes::new(&payload_buf)
14831        } else {
14832            Bytes::new(__input)
14833        };
14834        let mut __struct = Self::default();
14835        __struct.time_last_baseline_ms = buf.get_u32_le();
14836        __struct.tow = buf.get_u32_le();
14837        __struct.baseline_a_mm = buf.get_i32_le();
14838        __struct.baseline_b_mm = buf.get_i32_le();
14839        __struct.baseline_c_mm = buf.get_i32_le();
14840        __struct.accuracy = buf.get_u32_le();
14841        __struct.iar_num_hypotheses = buf.get_i32_le();
14842        __struct.wn = buf.get_u16_le();
14843        __struct.rtk_receiver_id = buf.get_u8();
14844        __struct.rtk_health = buf.get_u8();
14845        __struct.rtk_rate = buf.get_u8();
14846        __struct.nsats = buf.get_u8();
14847        let tmp = buf.get_u8();
14848        __struct.baseline_coords_type =
14849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14850                enum_type: "RtkBaselineCoordinateSystem",
14851                value: tmp as u32,
14852            })?;
14853        Ok(__struct)
14854    }
14855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14856        let mut __tmp = BytesMut::new(bytes);
14857        #[allow(clippy::absurd_extreme_comparisons)]
14858        #[allow(unused_comparisons)]
14859        if __tmp.remaining() < Self::ENCODED_LEN {
14860            panic!(
14861                "buffer is too small (need {} bytes, but got {})",
14862                Self::ENCODED_LEN,
14863                __tmp.remaining(),
14864            )
14865        }
14866        __tmp.put_u32_le(self.time_last_baseline_ms);
14867        __tmp.put_u32_le(self.tow);
14868        __tmp.put_i32_le(self.baseline_a_mm);
14869        __tmp.put_i32_le(self.baseline_b_mm);
14870        __tmp.put_i32_le(self.baseline_c_mm);
14871        __tmp.put_u32_le(self.accuracy);
14872        __tmp.put_i32_le(self.iar_num_hypotheses);
14873        __tmp.put_u16_le(self.wn);
14874        __tmp.put_u8(self.rtk_receiver_id);
14875        __tmp.put_u8(self.rtk_health);
14876        __tmp.put_u8(self.rtk_rate);
14877        __tmp.put_u8(self.nsats);
14878        __tmp.put_u8(self.baseline_coords_type as u8);
14879        if matches!(version, MavlinkVersion::V2) {
14880            let len = __tmp.len();
14881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14882        } else {
14883            __tmp.len()
14884        }
14885    }
14886}
14887#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14888#[doc = ""]
14889#[doc = "ID: 25"]
14890#[derive(Debug, Clone, PartialEq)]
14891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14893#[cfg_attr(feature = "ts", derive(TS))]
14894#[cfg_attr(feature = "ts", ts(export))]
14895pub struct GPS_STATUS_DATA {
14896    #[doc = "Number of satellites visible"]
14897    pub satellites_visible: u8,
14898    #[doc = "Global satellite ID"]
14899    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14900    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14901    pub satellite_prn: [u8; 20],
14902    #[doc = "0: Satellite not used, 1: used for localization"]
14903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14904    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14905    pub satellite_used: [u8; 20],
14906    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14907    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14908    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14909    pub satellite_elevation: [u8; 20],
14910    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14911    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14912    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14913    pub satellite_azimuth: [u8; 20],
14914    #[doc = "Signal to noise ratio of satellite"]
14915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14916    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14917    pub satellite_snr: [u8; 20],
14918}
14919impl GPS_STATUS_DATA {
14920    pub const ENCODED_LEN: usize = 101usize;
14921    pub const DEFAULT: Self = Self {
14922        satellites_visible: 0_u8,
14923        satellite_prn: [0_u8; 20usize],
14924        satellite_used: [0_u8; 20usize],
14925        satellite_elevation: [0_u8; 20usize],
14926        satellite_azimuth: [0_u8; 20usize],
14927        satellite_snr: [0_u8; 20usize],
14928    };
14929    #[cfg(feature = "arbitrary")]
14930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14931        use arbitrary::{Arbitrary, Unstructured};
14932        let mut buf = [0u8; 1024];
14933        rng.fill_bytes(&mut buf);
14934        let mut unstructured = Unstructured::new(&buf);
14935        Self::arbitrary(&mut unstructured).unwrap_or_default()
14936    }
14937}
14938impl Default for GPS_STATUS_DATA {
14939    fn default() -> Self {
14940        Self::DEFAULT.clone()
14941    }
14942}
14943impl MessageData for GPS_STATUS_DATA {
14944    type Message = MavMessage;
14945    const ID: u32 = 25u32;
14946    const NAME: &'static str = "GPS_STATUS";
14947    const EXTRA_CRC: u8 = 23u8;
14948    const ENCODED_LEN: usize = 101usize;
14949    fn deser(
14950        _version: MavlinkVersion,
14951        __input: &[u8],
14952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14953        let avail_len = __input.len();
14954        let mut payload_buf = [0; Self::ENCODED_LEN];
14955        let mut buf = if avail_len < Self::ENCODED_LEN {
14956            payload_buf[0..avail_len].copy_from_slice(__input);
14957            Bytes::new(&payload_buf)
14958        } else {
14959            Bytes::new(__input)
14960        };
14961        let mut __struct = Self::default();
14962        __struct.satellites_visible = buf.get_u8();
14963        for v in &mut __struct.satellite_prn {
14964            let val = buf.get_u8();
14965            *v = val;
14966        }
14967        for v in &mut __struct.satellite_used {
14968            let val = buf.get_u8();
14969            *v = val;
14970        }
14971        for v in &mut __struct.satellite_elevation {
14972            let val = buf.get_u8();
14973            *v = val;
14974        }
14975        for v in &mut __struct.satellite_azimuth {
14976            let val = buf.get_u8();
14977            *v = val;
14978        }
14979        for v in &mut __struct.satellite_snr {
14980            let val = buf.get_u8();
14981            *v = val;
14982        }
14983        Ok(__struct)
14984    }
14985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14986        let mut __tmp = BytesMut::new(bytes);
14987        #[allow(clippy::absurd_extreme_comparisons)]
14988        #[allow(unused_comparisons)]
14989        if __tmp.remaining() < Self::ENCODED_LEN {
14990            panic!(
14991                "buffer is too small (need {} bytes, but got {})",
14992                Self::ENCODED_LEN,
14993                __tmp.remaining(),
14994            )
14995        }
14996        __tmp.put_u8(self.satellites_visible);
14997        for val in &self.satellite_prn {
14998            __tmp.put_u8(*val);
14999        }
15000        for val in &self.satellite_used {
15001            __tmp.put_u8(*val);
15002        }
15003        for val in &self.satellite_elevation {
15004            __tmp.put_u8(*val);
15005        }
15006        for val in &self.satellite_azimuth {
15007            __tmp.put_u8(*val);
15008        }
15009        for val in &self.satellite_snr {
15010            __tmp.put_u8(*val);
15011        }
15012        if matches!(version, MavlinkVersion::V2) {
15013            let len = __tmp.len();
15014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15015        } else {
15016            __tmp.len()
15017        }
15018    }
15019}
15020#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15021#[doc = ""]
15022#[doc = "ID: 0"]
15023#[derive(Debug, Clone, PartialEq)]
15024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15026#[cfg_attr(feature = "ts", derive(TS))]
15027#[cfg_attr(feature = "ts", ts(export))]
15028pub struct HEARTBEAT_DATA {
15029    #[doc = "A bitfield for use for autopilot-specific flags"]
15030    pub custom_mode: u32,
15031    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15032    pub mavtype: MavType,
15033    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15034    pub autopilot: MavAutopilot,
15035    #[doc = "System mode bitmap."]
15036    pub base_mode: MavModeFlag,
15037    #[doc = "System status flag."]
15038    pub system_status: MavState,
15039    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15040    pub mavlink_version: u8,
15041}
15042impl HEARTBEAT_DATA {
15043    pub const ENCODED_LEN: usize = 9usize;
15044    pub const DEFAULT: Self = Self {
15045        custom_mode: 0_u32,
15046        mavtype: MavType::DEFAULT,
15047        autopilot: MavAutopilot::DEFAULT,
15048        base_mode: MavModeFlag::DEFAULT,
15049        system_status: MavState::DEFAULT,
15050        mavlink_version: MINOR_MAVLINK_VERSION,
15051    };
15052    #[cfg(feature = "arbitrary")]
15053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15054        use arbitrary::{Arbitrary, Unstructured};
15055        let mut buf = [0u8; 1024];
15056        rng.fill_bytes(&mut buf);
15057        let mut unstructured = Unstructured::new(&buf);
15058        Self::arbitrary(&mut unstructured).unwrap_or_default()
15059    }
15060}
15061impl Default for HEARTBEAT_DATA {
15062    fn default() -> Self {
15063        Self::DEFAULT.clone()
15064    }
15065}
15066impl MessageData for HEARTBEAT_DATA {
15067    type Message = MavMessage;
15068    const ID: u32 = 0u32;
15069    const NAME: &'static str = "HEARTBEAT";
15070    const EXTRA_CRC: u8 = 50u8;
15071    const ENCODED_LEN: usize = 9usize;
15072    fn deser(
15073        _version: MavlinkVersion,
15074        __input: &[u8],
15075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15076        let avail_len = __input.len();
15077        let mut payload_buf = [0; Self::ENCODED_LEN];
15078        let mut buf = if avail_len < Self::ENCODED_LEN {
15079            payload_buf[0..avail_len].copy_from_slice(__input);
15080            Bytes::new(&payload_buf)
15081        } else {
15082            Bytes::new(__input)
15083        };
15084        let mut __struct = Self::default();
15085        __struct.custom_mode = buf.get_u32_le();
15086        let tmp = buf.get_u8();
15087        __struct.mavtype =
15088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15089                enum_type: "MavType",
15090                value: tmp as u32,
15091            })?;
15092        let tmp = buf.get_u8();
15093        __struct.autopilot =
15094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15095                enum_type: "MavAutopilot",
15096                value: tmp as u32,
15097            })?;
15098        let tmp = buf.get_u8();
15099        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15100            ::mavlink_core::error::ParserError::InvalidFlag {
15101                flag_type: "MavModeFlag",
15102                value: tmp as u32,
15103            },
15104        )?;
15105        let tmp = buf.get_u8();
15106        __struct.system_status =
15107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15108                enum_type: "MavState",
15109                value: tmp as u32,
15110            })?;
15111        __struct.mavlink_version = buf.get_u8();
15112        Ok(__struct)
15113    }
15114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15115        let mut __tmp = BytesMut::new(bytes);
15116        #[allow(clippy::absurd_extreme_comparisons)]
15117        #[allow(unused_comparisons)]
15118        if __tmp.remaining() < Self::ENCODED_LEN {
15119            panic!(
15120                "buffer is too small (need {} bytes, but got {})",
15121                Self::ENCODED_LEN,
15122                __tmp.remaining(),
15123            )
15124        }
15125        __tmp.put_u32_le(self.custom_mode);
15126        __tmp.put_u8(self.mavtype as u8);
15127        __tmp.put_u8(self.autopilot as u8);
15128        __tmp.put_u8(self.base_mode.bits());
15129        __tmp.put_u8(self.system_status as u8);
15130        __tmp.put_u8(self.mavlink_version);
15131        if matches!(version, MavlinkVersion::V2) {
15132            let len = __tmp.len();
15133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15134        } else {
15135            __tmp.len()
15136        }
15137    }
15138}
15139#[doc = "The IMU readings in SI units in NED body frame."]
15140#[doc = ""]
15141#[doc = "ID: 105"]
15142#[derive(Debug, Clone, PartialEq)]
15143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15145#[cfg_attr(feature = "ts", derive(TS))]
15146#[cfg_attr(feature = "ts", ts(export))]
15147pub struct HIGHRES_IMU_DATA {
15148    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15149    pub time_usec: u64,
15150    #[doc = "X acceleration"]
15151    pub xacc: f32,
15152    #[doc = "Y acceleration"]
15153    pub yacc: f32,
15154    #[doc = "Z acceleration"]
15155    pub zacc: f32,
15156    #[doc = "Angular speed around X axis"]
15157    pub xgyro: f32,
15158    #[doc = "Angular speed around Y axis"]
15159    pub ygyro: f32,
15160    #[doc = "Angular speed around Z axis"]
15161    pub zgyro: f32,
15162    #[doc = "X Magnetic field"]
15163    pub xmag: f32,
15164    #[doc = "Y Magnetic field"]
15165    pub ymag: f32,
15166    #[doc = "Z Magnetic field"]
15167    pub zmag: f32,
15168    #[doc = "Absolute pressure"]
15169    pub abs_pressure: f32,
15170    #[doc = "Differential pressure"]
15171    pub diff_pressure: f32,
15172    #[doc = "Altitude calculated from pressure"]
15173    pub pressure_alt: f32,
15174    #[doc = "Temperature"]
15175    pub temperature: f32,
15176    #[doc = "Bitmap for fields that have updated since last message"]
15177    pub fields_updated: HighresImuUpdatedFlags,
15178    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15179    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15180    pub id: u8,
15181}
15182impl HIGHRES_IMU_DATA {
15183    pub const ENCODED_LEN: usize = 63usize;
15184    pub const DEFAULT: Self = Self {
15185        time_usec: 0_u64,
15186        xacc: 0.0_f32,
15187        yacc: 0.0_f32,
15188        zacc: 0.0_f32,
15189        xgyro: 0.0_f32,
15190        ygyro: 0.0_f32,
15191        zgyro: 0.0_f32,
15192        xmag: 0.0_f32,
15193        ymag: 0.0_f32,
15194        zmag: 0.0_f32,
15195        abs_pressure: 0.0_f32,
15196        diff_pressure: 0.0_f32,
15197        pressure_alt: 0.0_f32,
15198        temperature: 0.0_f32,
15199        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15200        id: 0_u8,
15201    };
15202    #[cfg(feature = "arbitrary")]
15203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15204        use arbitrary::{Arbitrary, Unstructured};
15205        let mut buf = [0u8; 1024];
15206        rng.fill_bytes(&mut buf);
15207        let mut unstructured = Unstructured::new(&buf);
15208        Self::arbitrary(&mut unstructured).unwrap_or_default()
15209    }
15210}
15211impl Default for HIGHRES_IMU_DATA {
15212    fn default() -> Self {
15213        Self::DEFAULT.clone()
15214    }
15215}
15216impl MessageData for HIGHRES_IMU_DATA {
15217    type Message = MavMessage;
15218    const ID: u32 = 105u32;
15219    const NAME: &'static str = "HIGHRES_IMU";
15220    const EXTRA_CRC: u8 = 93u8;
15221    const ENCODED_LEN: usize = 63usize;
15222    fn deser(
15223        _version: MavlinkVersion,
15224        __input: &[u8],
15225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15226        let avail_len = __input.len();
15227        let mut payload_buf = [0; Self::ENCODED_LEN];
15228        let mut buf = if avail_len < Self::ENCODED_LEN {
15229            payload_buf[0..avail_len].copy_from_slice(__input);
15230            Bytes::new(&payload_buf)
15231        } else {
15232            Bytes::new(__input)
15233        };
15234        let mut __struct = Self::default();
15235        __struct.time_usec = buf.get_u64_le();
15236        __struct.xacc = buf.get_f32_le();
15237        __struct.yacc = buf.get_f32_le();
15238        __struct.zacc = buf.get_f32_le();
15239        __struct.xgyro = buf.get_f32_le();
15240        __struct.ygyro = buf.get_f32_le();
15241        __struct.zgyro = buf.get_f32_le();
15242        __struct.xmag = buf.get_f32_le();
15243        __struct.ymag = buf.get_f32_le();
15244        __struct.zmag = buf.get_f32_le();
15245        __struct.abs_pressure = buf.get_f32_le();
15246        __struct.diff_pressure = buf.get_f32_le();
15247        __struct.pressure_alt = buf.get_f32_le();
15248        __struct.temperature = buf.get_f32_le();
15249        let tmp = buf.get_u16_le();
15250        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15251            tmp & HighresImuUpdatedFlags::all().bits(),
15252        )
15253        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15254            flag_type: "HighresImuUpdatedFlags",
15255            value: tmp as u32,
15256        })?;
15257        __struct.id = buf.get_u8();
15258        Ok(__struct)
15259    }
15260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15261        let mut __tmp = BytesMut::new(bytes);
15262        #[allow(clippy::absurd_extreme_comparisons)]
15263        #[allow(unused_comparisons)]
15264        if __tmp.remaining() < Self::ENCODED_LEN {
15265            panic!(
15266                "buffer is too small (need {} bytes, but got {})",
15267                Self::ENCODED_LEN,
15268                __tmp.remaining(),
15269            )
15270        }
15271        __tmp.put_u64_le(self.time_usec);
15272        __tmp.put_f32_le(self.xacc);
15273        __tmp.put_f32_le(self.yacc);
15274        __tmp.put_f32_le(self.zacc);
15275        __tmp.put_f32_le(self.xgyro);
15276        __tmp.put_f32_le(self.ygyro);
15277        __tmp.put_f32_le(self.zgyro);
15278        __tmp.put_f32_le(self.xmag);
15279        __tmp.put_f32_le(self.ymag);
15280        __tmp.put_f32_le(self.zmag);
15281        __tmp.put_f32_le(self.abs_pressure);
15282        __tmp.put_f32_le(self.diff_pressure);
15283        __tmp.put_f32_le(self.pressure_alt);
15284        __tmp.put_f32_le(self.temperature);
15285        __tmp.put_u16_le(self.fields_updated.bits());
15286        if matches!(version, MavlinkVersion::V2) {
15287            __tmp.put_u8(self.id);
15288            let len = __tmp.len();
15289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15290        } else {
15291            __tmp.len()
15292        }
15293    }
15294}
15295#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15296#[doc = "Message appropriate for high latency connections like Iridium."]
15297#[doc = ""]
15298#[doc = "ID: 234"]
15299#[derive(Debug, Clone, PartialEq)]
15300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15302#[cfg_attr(feature = "ts", derive(TS))]
15303#[cfg_attr(feature = "ts", ts(export))]
15304pub struct HIGH_LATENCY_DATA {
15305    #[doc = "A bitfield for use for autopilot-specific flags."]
15306    pub custom_mode: u32,
15307    #[doc = "Latitude"]
15308    pub latitude: i32,
15309    #[doc = "Longitude"]
15310    pub longitude: i32,
15311    #[doc = "roll"]
15312    pub roll: i16,
15313    #[doc = "pitch"]
15314    pub pitch: i16,
15315    #[doc = "heading"]
15316    pub heading: u16,
15317    #[doc = "heading setpoint"]
15318    pub heading_sp: i16,
15319    #[doc = "Altitude above mean sea level"]
15320    pub altitude_amsl: i16,
15321    #[doc = "Altitude setpoint relative to the home position"]
15322    pub altitude_sp: i16,
15323    #[doc = "distance to target"]
15324    pub wp_distance: u16,
15325    #[doc = "Bitmap of enabled system modes."]
15326    pub base_mode: MavModeFlag,
15327    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15328    pub landed_state: MavLandedState,
15329    #[doc = "throttle (percentage)"]
15330    pub throttle: i8,
15331    #[doc = "airspeed"]
15332    pub airspeed: u8,
15333    #[doc = "airspeed setpoint"]
15334    pub airspeed_sp: u8,
15335    #[doc = "groundspeed"]
15336    pub groundspeed: u8,
15337    #[doc = "climb rate"]
15338    pub climb_rate: i8,
15339    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15340    pub gps_nsat: u8,
15341    #[doc = "GPS Fix type."]
15342    pub gps_fix_type: GpsFixType,
15343    #[doc = "Remaining battery (percentage)"]
15344    pub battery_remaining: u8,
15345    #[doc = "Autopilot temperature (degrees C)"]
15346    pub temperature: i8,
15347    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15348    pub temperature_air: i8,
15349    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15350    pub failsafe: u8,
15351    #[doc = "current waypoint number"]
15352    pub wp_num: u8,
15353}
15354impl HIGH_LATENCY_DATA {
15355    pub const ENCODED_LEN: usize = 40usize;
15356    pub const DEFAULT: Self = Self {
15357        custom_mode: 0_u32,
15358        latitude: 0_i32,
15359        longitude: 0_i32,
15360        roll: 0_i16,
15361        pitch: 0_i16,
15362        heading: 0_u16,
15363        heading_sp: 0_i16,
15364        altitude_amsl: 0_i16,
15365        altitude_sp: 0_i16,
15366        wp_distance: 0_u16,
15367        base_mode: MavModeFlag::DEFAULT,
15368        landed_state: MavLandedState::DEFAULT,
15369        throttle: 0_i8,
15370        airspeed: 0_u8,
15371        airspeed_sp: 0_u8,
15372        groundspeed: 0_u8,
15373        climb_rate: 0_i8,
15374        gps_nsat: 0_u8,
15375        gps_fix_type: GpsFixType::DEFAULT,
15376        battery_remaining: 0_u8,
15377        temperature: 0_i8,
15378        temperature_air: 0_i8,
15379        failsafe: 0_u8,
15380        wp_num: 0_u8,
15381    };
15382    #[cfg(feature = "arbitrary")]
15383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15384        use arbitrary::{Arbitrary, Unstructured};
15385        let mut buf = [0u8; 1024];
15386        rng.fill_bytes(&mut buf);
15387        let mut unstructured = Unstructured::new(&buf);
15388        Self::arbitrary(&mut unstructured).unwrap_or_default()
15389    }
15390}
15391impl Default for HIGH_LATENCY_DATA {
15392    fn default() -> Self {
15393        Self::DEFAULT.clone()
15394    }
15395}
15396impl MessageData for HIGH_LATENCY_DATA {
15397    type Message = MavMessage;
15398    const ID: u32 = 234u32;
15399    const NAME: &'static str = "HIGH_LATENCY";
15400    const EXTRA_CRC: u8 = 150u8;
15401    const ENCODED_LEN: usize = 40usize;
15402    fn deser(
15403        _version: MavlinkVersion,
15404        __input: &[u8],
15405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15406        let avail_len = __input.len();
15407        let mut payload_buf = [0; Self::ENCODED_LEN];
15408        let mut buf = if avail_len < Self::ENCODED_LEN {
15409            payload_buf[0..avail_len].copy_from_slice(__input);
15410            Bytes::new(&payload_buf)
15411        } else {
15412            Bytes::new(__input)
15413        };
15414        let mut __struct = Self::default();
15415        __struct.custom_mode = buf.get_u32_le();
15416        __struct.latitude = buf.get_i32_le();
15417        __struct.longitude = buf.get_i32_le();
15418        __struct.roll = buf.get_i16_le();
15419        __struct.pitch = buf.get_i16_le();
15420        __struct.heading = buf.get_u16_le();
15421        __struct.heading_sp = buf.get_i16_le();
15422        __struct.altitude_amsl = buf.get_i16_le();
15423        __struct.altitude_sp = buf.get_i16_le();
15424        __struct.wp_distance = buf.get_u16_le();
15425        let tmp = buf.get_u8();
15426        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15427            ::mavlink_core::error::ParserError::InvalidFlag {
15428                flag_type: "MavModeFlag",
15429                value: tmp as u32,
15430            },
15431        )?;
15432        let tmp = buf.get_u8();
15433        __struct.landed_state =
15434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15435                enum_type: "MavLandedState",
15436                value: tmp as u32,
15437            })?;
15438        __struct.throttle = buf.get_i8();
15439        __struct.airspeed = buf.get_u8();
15440        __struct.airspeed_sp = buf.get_u8();
15441        __struct.groundspeed = buf.get_u8();
15442        __struct.climb_rate = buf.get_i8();
15443        __struct.gps_nsat = buf.get_u8();
15444        let tmp = buf.get_u8();
15445        __struct.gps_fix_type =
15446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15447                enum_type: "GpsFixType",
15448                value: tmp as u32,
15449            })?;
15450        __struct.battery_remaining = buf.get_u8();
15451        __struct.temperature = buf.get_i8();
15452        __struct.temperature_air = buf.get_i8();
15453        __struct.failsafe = buf.get_u8();
15454        __struct.wp_num = buf.get_u8();
15455        Ok(__struct)
15456    }
15457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15458        let mut __tmp = BytesMut::new(bytes);
15459        #[allow(clippy::absurd_extreme_comparisons)]
15460        #[allow(unused_comparisons)]
15461        if __tmp.remaining() < Self::ENCODED_LEN {
15462            panic!(
15463                "buffer is too small (need {} bytes, but got {})",
15464                Self::ENCODED_LEN,
15465                __tmp.remaining(),
15466            )
15467        }
15468        __tmp.put_u32_le(self.custom_mode);
15469        __tmp.put_i32_le(self.latitude);
15470        __tmp.put_i32_le(self.longitude);
15471        __tmp.put_i16_le(self.roll);
15472        __tmp.put_i16_le(self.pitch);
15473        __tmp.put_u16_le(self.heading);
15474        __tmp.put_i16_le(self.heading_sp);
15475        __tmp.put_i16_le(self.altitude_amsl);
15476        __tmp.put_i16_le(self.altitude_sp);
15477        __tmp.put_u16_le(self.wp_distance);
15478        __tmp.put_u8(self.base_mode.bits());
15479        __tmp.put_u8(self.landed_state as u8);
15480        __tmp.put_i8(self.throttle);
15481        __tmp.put_u8(self.airspeed);
15482        __tmp.put_u8(self.airspeed_sp);
15483        __tmp.put_u8(self.groundspeed);
15484        __tmp.put_i8(self.climb_rate);
15485        __tmp.put_u8(self.gps_nsat);
15486        __tmp.put_u8(self.gps_fix_type as u8);
15487        __tmp.put_u8(self.battery_remaining);
15488        __tmp.put_i8(self.temperature);
15489        __tmp.put_i8(self.temperature_air);
15490        __tmp.put_u8(self.failsafe);
15491        __tmp.put_u8(self.wp_num);
15492        if matches!(version, MavlinkVersion::V2) {
15493            let len = __tmp.len();
15494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15495        } else {
15496            __tmp.len()
15497        }
15498    }
15499}
15500#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15501#[doc = ""]
15502#[doc = "ID: 235"]
15503#[derive(Debug, Clone, PartialEq)]
15504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15506#[cfg_attr(feature = "ts", derive(TS))]
15507#[cfg_attr(feature = "ts", ts(export))]
15508pub struct HIGH_LATENCY2_DATA {
15509    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15510    pub timestamp: u32,
15511    #[doc = "Latitude"]
15512    pub latitude: i32,
15513    #[doc = "Longitude"]
15514    pub longitude: i32,
15515    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15516    pub custom_mode: u16,
15517    #[doc = "Altitude above mean sea level"]
15518    pub altitude: i16,
15519    #[doc = "Altitude setpoint"]
15520    pub target_altitude: i16,
15521    #[doc = "Distance to target waypoint or position"]
15522    pub target_distance: u16,
15523    #[doc = "Current waypoint number"]
15524    pub wp_num: u16,
15525    #[doc = "Bitmap of failure flags."]
15526    pub failure_flags: HlFailureFlag,
15527    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15528    pub mavtype: MavType,
15529    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15530    pub autopilot: MavAutopilot,
15531    #[doc = "Heading"]
15532    pub heading: u8,
15533    #[doc = "Heading setpoint"]
15534    pub target_heading: u8,
15535    #[doc = "Throttle"]
15536    pub throttle: u8,
15537    #[doc = "Airspeed"]
15538    pub airspeed: u8,
15539    #[doc = "Airspeed setpoint"]
15540    pub airspeed_sp: u8,
15541    #[doc = "Groundspeed"]
15542    pub groundspeed: u8,
15543    #[doc = "Windspeed"]
15544    pub windspeed: u8,
15545    #[doc = "Wind heading"]
15546    pub wind_heading: u8,
15547    #[doc = "Maximum error horizontal position since last message"]
15548    pub eph: u8,
15549    #[doc = "Maximum error vertical position since last message"]
15550    pub epv: u8,
15551    #[doc = "Air temperature"]
15552    pub temperature_air: i8,
15553    #[doc = "Maximum climb rate magnitude since last message"]
15554    pub climb_rate: i8,
15555    #[doc = "Battery level (-1 if field not provided)."]
15556    pub battery: i8,
15557    #[doc = "Field for custom payload."]
15558    pub custom0: i8,
15559    #[doc = "Field for custom payload."]
15560    pub custom1: i8,
15561    #[doc = "Field for custom payload."]
15562    pub custom2: i8,
15563}
15564impl HIGH_LATENCY2_DATA {
15565    pub const ENCODED_LEN: usize = 42usize;
15566    pub const DEFAULT: Self = Self {
15567        timestamp: 0_u32,
15568        latitude: 0_i32,
15569        longitude: 0_i32,
15570        custom_mode: 0_u16,
15571        altitude: 0_i16,
15572        target_altitude: 0_i16,
15573        target_distance: 0_u16,
15574        wp_num: 0_u16,
15575        failure_flags: HlFailureFlag::DEFAULT,
15576        mavtype: MavType::DEFAULT,
15577        autopilot: MavAutopilot::DEFAULT,
15578        heading: 0_u8,
15579        target_heading: 0_u8,
15580        throttle: 0_u8,
15581        airspeed: 0_u8,
15582        airspeed_sp: 0_u8,
15583        groundspeed: 0_u8,
15584        windspeed: 0_u8,
15585        wind_heading: 0_u8,
15586        eph: 0_u8,
15587        epv: 0_u8,
15588        temperature_air: 0_i8,
15589        climb_rate: 0_i8,
15590        battery: 0_i8,
15591        custom0: 0_i8,
15592        custom1: 0_i8,
15593        custom2: 0_i8,
15594    };
15595    #[cfg(feature = "arbitrary")]
15596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15597        use arbitrary::{Arbitrary, Unstructured};
15598        let mut buf = [0u8; 1024];
15599        rng.fill_bytes(&mut buf);
15600        let mut unstructured = Unstructured::new(&buf);
15601        Self::arbitrary(&mut unstructured).unwrap_or_default()
15602    }
15603}
15604impl Default for HIGH_LATENCY2_DATA {
15605    fn default() -> Self {
15606        Self::DEFAULT.clone()
15607    }
15608}
15609impl MessageData for HIGH_LATENCY2_DATA {
15610    type Message = MavMessage;
15611    const ID: u32 = 235u32;
15612    const NAME: &'static str = "HIGH_LATENCY2";
15613    const EXTRA_CRC: u8 = 179u8;
15614    const ENCODED_LEN: usize = 42usize;
15615    fn deser(
15616        _version: MavlinkVersion,
15617        __input: &[u8],
15618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15619        let avail_len = __input.len();
15620        let mut payload_buf = [0; Self::ENCODED_LEN];
15621        let mut buf = if avail_len < Self::ENCODED_LEN {
15622            payload_buf[0..avail_len].copy_from_slice(__input);
15623            Bytes::new(&payload_buf)
15624        } else {
15625            Bytes::new(__input)
15626        };
15627        let mut __struct = Self::default();
15628        __struct.timestamp = buf.get_u32_le();
15629        __struct.latitude = buf.get_i32_le();
15630        __struct.longitude = buf.get_i32_le();
15631        __struct.custom_mode = buf.get_u16_le();
15632        __struct.altitude = buf.get_i16_le();
15633        __struct.target_altitude = buf.get_i16_le();
15634        __struct.target_distance = buf.get_u16_le();
15635        __struct.wp_num = buf.get_u16_le();
15636        let tmp = buf.get_u16_le();
15637        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15638            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15639                flag_type: "HlFailureFlag",
15640                value: tmp as u32,
15641            })?;
15642        let tmp = buf.get_u8();
15643        __struct.mavtype =
15644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15645                enum_type: "MavType",
15646                value: tmp as u32,
15647            })?;
15648        let tmp = buf.get_u8();
15649        __struct.autopilot =
15650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15651                enum_type: "MavAutopilot",
15652                value: tmp as u32,
15653            })?;
15654        __struct.heading = buf.get_u8();
15655        __struct.target_heading = buf.get_u8();
15656        __struct.throttle = buf.get_u8();
15657        __struct.airspeed = buf.get_u8();
15658        __struct.airspeed_sp = buf.get_u8();
15659        __struct.groundspeed = buf.get_u8();
15660        __struct.windspeed = buf.get_u8();
15661        __struct.wind_heading = buf.get_u8();
15662        __struct.eph = buf.get_u8();
15663        __struct.epv = buf.get_u8();
15664        __struct.temperature_air = buf.get_i8();
15665        __struct.climb_rate = buf.get_i8();
15666        __struct.battery = buf.get_i8();
15667        __struct.custom0 = buf.get_i8();
15668        __struct.custom1 = buf.get_i8();
15669        __struct.custom2 = buf.get_i8();
15670        Ok(__struct)
15671    }
15672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15673        let mut __tmp = BytesMut::new(bytes);
15674        #[allow(clippy::absurd_extreme_comparisons)]
15675        #[allow(unused_comparisons)]
15676        if __tmp.remaining() < Self::ENCODED_LEN {
15677            panic!(
15678                "buffer is too small (need {} bytes, but got {})",
15679                Self::ENCODED_LEN,
15680                __tmp.remaining(),
15681            )
15682        }
15683        __tmp.put_u32_le(self.timestamp);
15684        __tmp.put_i32_le(self.latitude);
15685        __tmp.put_i32_le(self.longitude);
15686        __tmp.put_u16_le(self.custom_mode);
15687        __tmp.put_i16_le(self.altitude);
15688        __tmp.put_i16_le(self.target_altitude);
15689        __tmp.put_u16_le(self.target_distance);
15690        __tmp.put_u16_le(self.wp_num);
15691        __tmp.put_u16_le(self.failure_flags.bits());
15692        __tmp.put_u8(self.mavtype as u8);
15693        __tmp.put_u8(self.autopilot as u8);
15694        __tmp.put_u8(self.heading);
15695        __tmp.put_u8(self.target_heading);
15696        __tmp.put_u8(self.throttle);
15697        __tmp.put_u8(self.airspeed);
15698        __tmp.put_u8(self.airspeed_sp);
15699        __tmp.put_u8(self.groundspeed);
15700        __tmp.put_u8(self.windspeed);
15701        __tmp.put_u8(self.wind_heading);
15702        __tmp.put_u8(self.eph);
15703        __tmp.put_u8(self.epv);
15704        __tmp.put_i8(self.temperature_air);
15705        __tmp.put_i8(self.climb_rate);
15706        __tmp.put_i8(self.battery);
15707        __tmp.put_i8(self.custom0);
15708        __tmp.put_i8(self.custom1);
15709        __tmp.put_i8(self.custom2);
15710        if matches!(version, MavlinkVersion::V2) {
15711            let len = __tmp.len();
15712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15713        } else {
15714            __tmp.len()
15715        }
15716    }
15717}
15718#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15719#[doc = ""]
15720#[doc = "ID: 93"]
15721#[derive(Debug, Clone, PartialEq)]
15722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15724#[cfg_attr(feature = "ts", derive(TS))]
15725#[cfg_attr(feature = "ts", ts(export))]
15726pub struct HIL_ACTUATOR_CONTROLS_DATA {
15727    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15728    pub time_usec: u64,
15729    #[doc = "Flags bitmask."]
15730    pub flags: HilActuatorControlsFlags,
15731    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15734    pub controls: [f32; 16],
15735    #[doc = "System mode. Includes arming state."]
15736    pub mode: MavModeFlag,
15737}
15738impl HIL_ACTUATOR_CONTROLS_DATA {
15739    pub const ENCODED_LEN: usize = 81usize;
15740    pub const DEFAULT: Self = Self {
15741        time_usec: 0_u64,
15742        flags: HilActuatorControlsFlags::DEFAULT,
15743        controls: [0.0_f32; 16usize],
15744        mode: MavModeFlag::DEFAULT,
15745    };
15746    #[cfg(feature = "arbitrary")]
15747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15748        use arbitrary::{Arbitrary, Unstructured};
15749        let mut buf = [0u8; 1024];
15750        rng.fill_bytes(&mut buf);
15751        let mut unstructured = Unstructured::new(&buf);
15752        Self::arbitrary(&mut unstructured).unwrap_or_default()
15753    }
15754}
15755impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15756    fn default() -> Self {
15757        Self::DEFAULT.clone()
15758    }
15759}
15760impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15761    type Message = MavMessage;
15762    const ID: u32 = 93u32;
15763    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15764    const EXTRA_CRC: u8 = 47u8;
15765    const ENCODED_LEN: usize = 81usize;
15766    fn deser(
15767        _version: MavlinkVersion,
15768        __input: &[u8],
15769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15770        let avail_len = __input.len();
15771        let mut payload_buf = [0; Self::ENCODED_LEN];
15772        let mut buf = if avail_len < Self::ENCODED_LEN {
15773            payload_buf[0..avail_len].copy_from_slice(__input);
15774            Bytes::new(&payload_buf)
15775        } else {
15776            Bytes::new(__input)
15777        };
15778        let mut __struct = Self::default();
15779        __struct.time_usec = buf.get_u64_le();
15780        let tmp = buf.get_u64_le();
15781        __struct.flags =
15782            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15783                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15784                    flag_type: "HilActuatorControlsFlags",
15785                    value: tmp as u32,
15786                })?;
15787        for v in &mut __struct.controls {
15788            let val = buf.get_f32_le();
15789            *v = val;
15790        }
15791        let tmp = buf.get_u8();
15792        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15793            ::mavlink_core::error::ParserError::InvalidFlag {
15794                flag_type: "MavModeFlag",
15795                value: tmp as u32,
15796            },
15797        )?;
15798        Ok(__struct)
15799    }
15800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15801        let mut __tmp = BytesMut::new(bytes);
15802        #[allow(clippy::absurd_extreme_comparisons)]
15803        #[allow(unused_comparisons)]
15804        if __tmp.remaining() < Self::ENCODED_LEN {
15805            panic!(
15806                "buffer is too small (need {} bytes, but got {})",
15807                Self::ENCODED_LEN,
15808                __tmp.remaining(),
15809            )
15810        }
15811        __tmp.put_u64_le(self.time_usec);
15812        __tmp.put_u64_le(self.flags.bits());
15813        for val in &self.controls {
15814            __tmp.put_f32_le(*val);
15815        }
15816        __tmp.put_u8(self.mode.bits());
15817        if matches!(version, MavlinkVersion::V2) {
15818            let len = __tmp.len();
15819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15820        } else {
15821            __tmp.len()
15822        }
15823    }
15824}
15825#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15826#[doc = ""]
15827#[doc = "ID: 91"]
15828#[derive(Debug, Clone, PartialEq)]
15829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15831#[cfg_attr(feature = "ts", derive(TS))]
15832#[cfg_attr(feature = "ts", ts(export))]
15833pub struct HIL_CONTROLS_DATA {
15834    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15835    pub time_usec: u64,
15836    #[doc = "Control output -1 .. 1"]
15837    pub roll_ailerons: f32,
15838    #[doc = "Control output -1 .. 1"]
15839    pub pitch_elevator: f32,
15840    #[doc = "Control output -1 .. 1"]
15841    pub yaw_rudder: f32,
15842    #[doc = "Throttle 0 .. 1"]
15843    pub throttle: f32,
15844    #[doc = "Aux 1, -1 .. 1"]
15845    pub aux1: f32,
15846    #[doc = "Aux 2, -1 .. 1"]
15847    pub aux2: f32,
15848    #[doc = "Aux 3, -1 .. 1"]
15849    pub aux3: f32,
15850    #[doc = "Aux 4, -1 .. 1"]
15851    pub aux4: f32,
15852    #[doc = "System mode."]
15853    pub mode: MavMode,
15854    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15855    pub nav_mode: u8,
15856}
15857impl HIL_CONTROLS_DATA {
15858    pub const ENCODED_LEN: usize = 42usize;
15859    pub const DEFAULT: Self = Self {
15860        time_usec: 0_u64,
15861        roll_ailerons: 0.0_f32,
15862        pitch_elevator: 0.0_f32,
15863        yaw_rudder: 0.0_f32,
15864        throttle: 0.0_f32,
15865        aux1: 0.0_f32,
15866        aux2: 0.0_f32,
15867        aux3: 0.0_f32,
15868        aux4: 0.0_f32,
15869        mode: MavMode::DEFAULT,
15870        nav_mode: 0_u8,
15871    };
15872    #[cfg(feature = "arbitrary")]
15873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15874        use arbitrary::{Arbitrary, Unstructured};
15875        let mut buf = [0u8; 1024];
15876        rng.fill_bytes(&mut buf);
15877        let mut unstructured = Unstructured::new(&buf);
15878        Self::arbitrary(&mut unstructured).unwrap_or_default()
15879    }
15880}
15881impl Default for HIL_CONTROLS_DATA {
15882    fn default() -> Self {
15883        Self::DEFAULT.clone()
15884    }
15885}
15886impl MessageData for HIL_CONTROLS_DATA {
15887    type Message = MavMessage;
15888    const ID: u32 = 91u32;
15889    const NAME: &'static str = "HIL_CONTROLS";
15890    const EXTRA_CRC: u8 = 63u8;
15891    const ENCODED_LEN: usize = 42usize;
15892    fn deser(
15893        _version: MavlinkVersion,
15894        __input: &[u8],
15895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15896        let avail_len = __input.len();
15897        let mut payload_buf = [0; Self::ENCODED_LEN];
15898        let mut buf = if avail_len < Self::ENCODED_LEN {
15899            payload_buf[0..avail_len].copy_from_slice(__input);
15900            Bytes::new(&payload_buf)
15901        } else {
15902            Bytes::new(__input)
15903        };
15904        let mut __struct = Self::default();
15905        __struct.time_usec = buf.get_u64_le();
15906        __struct.roll_ailerons = buf.get_f32_le();
15907        __struct.pitch_elevator = buf.get_f32_le();
15908        __struct.yaw_rudder = buf.get_f32_le();
15909        __struct.throttle = buf.get_f32_le();
15910        __struct.aux1 = buf.get_f32_le();
15911        __struct.aux2 = buf.get_f32_le();
15912        __struct.aux3 = buf.get_f32_le();
15913        __struct.aux4 = buf.get_f32_le();
15914        let tmp = buf.get_u8();
15915        __struct.mode =
15916            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15917                enum_type: "MavMode",
15918                value: tmp as u32,
15919            })?;
15920        __struct.nav_mode = buf.get_u8();
15921        Ok(__struct)
15922    }
15923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15924        let mut __tmp = BytesMut::new(bytes);
15925        #[allow(clippy::absurd_extreme_comparisons)]
15926        #[allow(unused_comparisons)]
15927        if __tmp.remaining() < Self::ENCODED_LEN {
15928            panic!(
15929                "buffer is too small (need {} bytes, but got {})",
15930                Self::ENCODED_LEN,
15931                __tmp.remaining(),
15932            )
15933        }
15934        __tmp.put_u64_le(self.time_usec);
15935        __tmp.put_f32_le(self.roll_ailerons);
15936        __tmp.put_f32_le(self.pitch_elevator);
15937        __tmp.put_f32_le(self.yaw_rudder);
15938        __tmp.put_f32_le(self.throttle);
15939        __tmp.put_f32_le(self.aux1);
15940        __tmp.put_f32_le(self.aux2);
15941        __tmp.put_f32_le(self.aux3);
15942        __tmp.put_f32_le(self.aux4);
15943        __tmp.put_u8(self.mode as u8);
15944        __tmp.put_u8(self.nav_mode);
15945        if matches!(version, MavlinkVersion::V2) {
15946            let len = __tmp.len();
15947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15948        } else {
15949            __tmp.len()
15950        }
15951    }
15952}
15953#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15954#[doc = ""]
15955#[doc = "ID: 113"]
15956#[derive(Debug, Clone, PartialEq)]
15957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15959#[cfg_attr(feature = "ts", derive(TS))]
15960#[cfg_attr(feature = "ts", ts(export))]
15961pub struct HIL_GPS_DATA {
15962    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15963    pub time_usec: u64,
15964    #[doc = "Latitude (WGS84)"]
15965    pub lat: i32,
15966    #[doc = "Longitude (WGS84)"]
15967    pub lon: i32,
15968    #[doc = "Altitude (MSL). Positive for up."]
15969    pub alt: i32,
15970    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15971    pub eph: u16,
15972    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15973    pub epv: u16,
15974    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15975    pub vel: u16,
15976    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15977    pub vn: i16,
15978    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15979    pub ve: i16,
15980    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15981    pub vd: i16,
15982    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15983    pub cog: u16,
15984    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15985    pub fix_type: u8,
15986    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15987    pub satellites_visible: u8,
15988    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15989    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15990    pub id: u8,
15991    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15993    pub yaw: u16,
15994}
15995impl HIL_GPS_DATA {
15996    pub const ENCODED_LEN: usize = 39usize;
15997    pub const DEFAULT: Self = Self {
15998        time_usec: 0_u64,
15999        lat: 0_i32,
16000        lon: 0_i32,
16001        alt: 0_i32,
16002        eph: 0_u16,
16003        epv: 0_u16,
16004        vel: 0_u16,
16005        vn: 0_i16,
16006        ve: 0_i16,
16007        vd: 0_i16,
16008        cog: 0_u16,
16009        fix_type: 0_u8,
16010        satellites_visible: 0_u8,
16011        id: 0_u8,
16012        yaw: 0_u16,
16013    };
16014    #[cfg(feature = "arbitrary")]
16015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16016        use arbitrary::{Arbitrary, Unstructured};
16017        let mut buf = [0u8; 1024];
16018        rng.fill_bytes(&mut buf);
16019        let mut unstructured = Unstructured::new(&buf);
16020        Self::arbitrary(&mut unstructured).unwrap_or_default()
16021    }
16022}
16023impl Default for HIL_GPS_DATA {
16024    fn default() -> Self {
16025        Self::DEFAULT.clone()
16026    }
16027}
16028impl MessageData for HIL_GPS_DATA {
16029    type Message = MavMessage;
16030    const ID: u32 = 113u32;
16031    const NAME: &'static str = "HIL_GPS";
16032    const EXTRA_CRC: u8 = 124u8;
16033    const ENCODED_LEN: usize = 39usize;
16034    fn deser(
16035        _version: MavlinkVersion,
16036        __input: &[u8],
16037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16038        let avail_len = __input.len();
16039        let mut payload_buf = [0; Self::ENCODED_LEN];
16040        let mut buf = if avail_len < Self::ENCODED_LEN {
16041            payload_buf[0..avail_len].copy_from_slice(__input);
16042            Bytes::new(&payload_buf)
16043        } else {
16044            Bytes::new(__input)
16045        };
16046        let mut __struct = Self::default();
16047        __struct.time_usec = buf.get_u64_le();
16048        __struct.lat = buf.get_i32_le();
16049        __struct.lon = buf.get_i32_le();
16050        __struct.alt = buf.get_i32_le();
16051        __struct.eph = buf.get_u16_le();
16052        __struct.epv = buf.get_u16_le();
16053        __struct.vel = buf.get_u16_le();
16054        __struct.vn = buf.get_i16_le();
16055        __struct.ve = buf.get_i16_le();
16056        __struct.vd = buf.get_i16_le();
16057        __struct.cog = buf.get_u16_le();
16058        __struct.fix_type = buf.get_u8();
16059        __struct.satellites_visible = buf.get_u8();
16060        __struct.id = buf.get_u8();
16061        __struct.yaw = buf.get_u16_le();
16062        Ok(__struct)
16063    }
16064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16065        let mut __tmp = BytesMut::new(bytes);
16066        #[allow(clippy::absurd_extreme_comparisons)]
16067        #[allow(unused_comparisons)]
16068        if __tmp.remaining() < Self::ENCODED_LEN {
16069            panic!(
16070                "buffer is too small (need {} bytes, but got {})",
16071                Self::ENCODED_LEN,
16072                __tmp.remaining(),
16073            )
16074        }
16075        __tmp.put_u64_le(self.time_usec);
16076        __tmp.put_i32_le(self.lat);
16077        __tmp.put_i32_le(self.lon);
16078        __tmp.put_i32_le(self.alt);
16079        __tmp.put_u16_le(self.eph);
16080        __tmp.put_u16_le(self.epv);
16081        __tmp.put_u16_le(self.vel);
16082        __tmp.put_i16_le(self.vn);
16083        __tmp.put_i16_le(self.ve);
16084        __tmp.put_i16_le(self.vd);
16085        __tmp.put_u16_le(self.cog);
16086        __tmp.put_u8(self.fix_type);
16087        __tmp.put_u8(self.satellites_visible);
16088        if matches!(version, MavlinkVersion::V2) {
16089            __tmp.put_u8(self.id);
16090            __tmp.put_u16_le(self.yaw);
16091            let len = __tmp.len();
16092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16093        } else {
16094            __tmp.len()
16095        }
16096    }
16097}
16098#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16099#[doc = ""]
16100#[doc = "ID: 114"]
16101#[derive(Debug, Clone, PartialEq)]
16102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16104#[cfg_attr(feature = "ts", derive(TS))]
16105#[cfg_attr(feature = "ts", ts(export))]
16106pub struct HIL_OPTICAL_FLOW_DATA {
16107    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16108    pub time_usec: u64,
16109    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16110    pub integration_time_us: u32,
16111    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16112    pub integrated_x: f32,
16113    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16114    pub integrated_y: f32,
16115    #[doc = "RH rotation around X axis"]
16116    pub integrated_xgyro: f32,
16117    #[doc = "RH rotation around Y axis"]
16118    pub integrated_ygyro: f32,
16119    #[doc = "RH rotation around Z axis"]
16120    pub integrated_zgyro: f32,
16121    #[doc = "Time since the distance was sampled."]
16122    pub time_delta_distance_us: u32,
16123    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16124    pub distance: f32,
16125    #[doc = "Temperature"]
16126    pub temperature: i16,
16127    #[doc = "Sensor ID"]
16128    pub sensor_id: u8,
16129    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16130    pub quality: u8,
16131}
16132impl HIL_OPTICAL_FLOW_DATA {
16133    pub const ENCODED_LEN: usize = 44usize;
16134    pub const DEFAULT: Self = Self {
16135        time_usec: 0_u64,
16136        integration_time_us: 0_u32,
16137        integrated_x: 0.0_f32,
16138        integrated_y: 0.0_f32,
16139        integrated_xgyro: 0.0_f32,
16140        integrated_ygyro: 0.0_f32,
16141        integrated_zgyro: 0.0_f32,
16142        time_delta_distance_us: 0_u32,
16143        distance: 0.0_f32,
16144        temperature: 0_i16,
16145        sensor_id: 0_u8,
16146        quality: 0_u8,
16147    };
16148    #[cfg(feature = "arbitrary")]
16149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16150        use arbitrary::{Arbitrary, Unstructured};
16151        let mut buf = [0u8; 1024];
16152        rng.fill_bytes(&mut buf);
16153        let mut unstructured = Unstructured::new(&buf);
16154        Self::arbitrary(&mut unstructured).unwrap_or_default()
16155    }
16156}
16157impl Default for HIL_OPTICAL_FLOW_DATA {
16158    fn default() -> Self {
16159        Self::DEFAULT.clone()
16160    }
16161}
16162impl MessageData for HIL_OPTICAL_FLOW_DATA {
16163    type Message = MavMessage;
16164    const ID: u32 = 114u32;
16165    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16166    const EXTRA_CRC: u8 = 237u8;
16167    const ENCODED_LEN: usize = 44usize;
16168    fn deser(
16169        _version: MavlinkVersion,
16170        __input: &[u8],
16171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16172        let avail_len = __input.len();
16173        let mut payload_buf = [0; Self::ENCODED_LEN];
16174        let mut buf = if avail_len < Self::ENCODED_LEN {
16175            payload_buf[0..avail_len].copy_from_slice(__input);
16176            Bytes::new(&payload_buf)
16177        } else {
16178            Bytes::new(__input)
16179        };
16180        let mut __struct = Self::default();
16181        __struct.time_usec = buf.get_u64_le();
16182        __struct.integration_time_us = buf.get_u32_le();
16183        __struct.integrated_x = buf.get_f32_le();
16184        __struct.integrated_y = buf.get_f32_le();
16185        __struct.integrated_xgyro = buf.get_f32_le();
16186        __struct.integrated_ygyro = buf.get_f32_le();
16187        __struct.integrated_zgyro = buf.get_f32_le();
16188        __struct.time_delta_distance_us = buf.get_u32_le();
16189        __struct.distance = buf.get_f32_le();
16190        __struct.temperature = buf.get_i16_le();
16191        __struct.sensor_id = buf.get_u8();
16192        __struct.quality = buf.get_u8();
16193        Ok(__struct)
16194    }
16195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16196        let mut __tmp = BytesMut::new(bytes);
16197        #[allow(clippy::absurd_extreme_comparisons)]
16198        #[allow(unused_comparisons)]
16199        if __tmp.remaining() < Self::ENCODED_LEN {
16200            panic!(
16201                "buffer is too small (need {} bytes, but got {})",
16202                Self::ENCODED_LEN,
16203                __tmp.remaining(),
16204            )
16205        }
16206        __tmp.put_u64_le(self.time_usec);
16207        __tmp.put_u32_le(self.integration_time_us);
16208        __tmp.put_f32_le(self.integrated_x);
16209        __tmp.put_f32_le(self.integrated_y);
16210        __tmp.put_f32_le(self.integrated_xgyro);
16211        __tmp.put_f32_le(self.integrated_ygyro);
16212        __tmp.put_f32_le(self.integrated_zgyro);
16213        __tmp.put_u32_le(self.time_delta_distance_us);
16214        __tmp.put_f32_le(self.distance);
16215        __tmp.put_i16_le(self.temperature);
16216        __tmp.put_u8(self.sensor_id);
16217        __tmp.put_u8(self.quality);
16218        if matches!(version, MavlinkVersion::V2) {
16219            let len = __tmp.len();
16220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16221        } else {
16222            __tmp.len()
16223        }
16224    }
16225}
16226#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16227#[doc = ""]
16228#[doc = "ID: 92"]
16229#[derive(Debug, Clone, PartialEq)]
16230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16232#[cfg_attr(feature = "ts", derive(TS))]
16233#[cfg_attr(feature = "ts", ts(export))]
16234pub struct HIL_RC_INPUTS_RAW_DATA {
16235    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16236    pub time_usec: u64,
16237    #[doc = "RC channel 1 value"]
16238    pub chan1_raw: u16,
16239    #[doc = "RC channel 2 value"]
16240    pub chan2_raw: u16,
16241    #[doc = "RC channel 3 value"]
16242    pub chan3_raw: u16,
16243    #[doc = "RC channel 4 value"]
16244    pub chan4_raw: u16,
16245    #[doc = "RC channel 5 value"]
16246    pub chan5_raw: u16,
16247    #[doc = "RC channel 6 value"]
16248    pub chan6_raw: u16,
16249    #[doc = "RC channel 7 value"]
16250    pub chan7_raw: u16,
16251    #[doc = "RC channel 8 value"]
16252    pub chan8_raw: u16,
16253    #[doc = "RC channel 9 value"]
16254    pub chan9_raw: u16,
16255    #[doc = "RC channel 10 value"]
16256    pub chan10_raw: u16,
16257    #[doc = "RC channel 11 value"]
16258    pub chan11_raw: u16,
16259    #[doc = "RC channel 12 value"]
16260    pub chan12_raw: u16,
16261    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16262    pub rssi: u8,
16263}
16264impl HIL_RC_INPUTS_RAW_DATA {
16265    pub const ENCODED_LEN: usize = 33usize;
16266    pub const DEFAULT: Self = Self {
16267        time_usec: 0_u64,
16268        chan1_raw: 0_u16,
16269        chan2_raw: 0_u16,
16270        chan3_raw: 0_u16,
16271        chan4_raw: 0_u16,
16272        chan5_raw: 0_u16,
16273        chan6_raw: 0_u16,
16274        chan7_raw: 0_u16,
16275        chan8_raw: 0_u16,
16276        chan9_raw: 0_u16,
16277        chan10_raw: 0_u16,
16278        chan11_raw: 0_u16,
16279        chan12_raw: 0_u16,
16280        rssi: 0_u8,
16281    };
16282    #[cfg(feature = "arbitrary")]
16283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16284        use arbitrary::{Arbitrary, Unstructured};
16285        let mut buf = [0u8; 1024];
16286        rng.fill_bytes(&mut buf);
16287        let mut unstructured = Unstructured::new(&buf);
16288        Self::arbitrary(&mut unstructured).unwrap_or_default()
16289    }
16290}
16291impl Default for HIL_RC_INPUTS_RAW_DATA {
16292    fn default() -> Self {
16293        Self::DEFAULT.clone()
16294    }
16295}
16296impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16297    type Message = MavMessage;
16298    const ID: u32 = 92u32;
16299    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16300    const EXTRA_CRC: u8 = 54u8;
16301    const ENCODED_LEN: usize = 33usize;
16302    fn deser(
16303        _version: MavlinkVersion,
16304        __input: &[u8],
16305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16306        let avail_len = __input.len();
16307        let mut payload_buf = [0; Self::ENCODED_LEN];
16308        let mut buf = if avail_len < Self::ENCODED_LEN {
16309            payload_buf[0..avail_len].copy_from_slice(__input);
16310            Bytes::new(&payload_buf)
16311        } else {
16312            Bytes::new(__input)
16313        };
16314        let mut __struct = Self::default();
16315        __struct.time_usec = buf.get_u64_le();
16316        __struct.chan1_raw = buf.get_u16_le();
16317        __struct.chan2_raw = buf.get_u16_le();
16318        __struct.chan3_raw = buf.get_u16_le();
16319        __struct.chan4_raw = buf.get_u16_le();
16320        __struct.chan5_raw = buf.get_u16_le();
16321        __struct.chan6_raw = buf.get_u16_le();
16322        __struct.chan7_raw = buf.get_u16_le();
16323        __struct.chan8_raw = buf.get_u16_le();
16324        __struct.chan9_raw = buf.get_u16_le();
16325        __struct.chan10_raw = buf.get_u16_le();
16326        __struct.chan11_raw = buf.get_u16_le();
16327        __struct.chan12_raw = buf.get_u16_le();
16328        __struct.rssi = buf.get_u8();
16329        Ok(__struct)
16330    }
16331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16332        let mut __tmp = BytesMut::new(bytes);
16333        #[allow(clippy::absurd_extreme_comparisons)]
16334        #[allow(unused_comparisons)]
16335        if __tmp.remaining() < Self::ENCODED_LEN {
16336            panic!(
16337                "buffer is too small (need {} bytes, but got {})",
16338                Self::ENCODED_LEN,
16339                __tmp.remaining(),
16340            )
16341        }
16342        __tmp.put_u64_le(self.time_usec);
16343        __tmp.put_u16_le(self.chan1_raw);
16344        __tmp.put_u16_le(self.chan2_raw);
16345        __tmp.put_u16_le(self.chan3_raw);
16346        __tmp.put_u16_le(self.chan4_raw);
16347        __tmp.put_u16_le(self.chan5_raw);
16348        __tmp.put_u16_le(self.chan6_raw);
16349        __tmp.put_u16_le(self.chan7_raw);
16350        __tmp.put_u16_le(self.chan8_raw);
16351        __tmp.put_u16_le(self.chan9_raw);
16352        __tmp.put_u16_le(self.chan10_raw);
16353        __tmp.put_u16_le(self.chan11_raw);
16354        __tmp.put_u16_le(self.chan12_raw);
16355        __tmp.put_u8(self.rssi);
16356        if matches!(version, MavlinkVersion::V2) {
16357            let len = __tmp.len();
16358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16359        } else {
16360            __tmp.len()
16361        }
16362    }
16363}
16364#[doc = "The IMU readings in SI units in NED body frame."]
16365#[doc = ""]
16366#[doc = "ID: 107"]
16367#[derive(Debug, Clone, PartialEq)]
16368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16370#[cfg_attr(feature = "ts", derive(TS))]
16371#[cfg_attr(feature = "ts", ts(export))]
16372pub struct HIL_SENSOR_DATA {
16373    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16374    pub time_usec: u64,
16375    #[doc = "X acceleration"]
16376    pub xacc: f32,
16377    #[doc = "Y acceleration"]
16378    pub yacc: f32,
16379    #[doc = "Z acceleration"]
16380    pub zacc: f32,
16381    #[doc = "Angular speed around X axis in body frame"]
16382    pub xgyro: f32,
16383    #[doc = "Angular speed around Y axis in body frame"]
16384    pub ygyro: f32,
16385    #[doc = "Angular speed around Z axis in body frame"]
16386    pub zgyro: f32,
16387    #[doc = "X Magnetic field"]
16388    pub xmag: f32,
16389    #[doc = "Y Magnetic field"]
16390    pub ymag: f32,
16391    #[doc = "Z Magnetic field"]
16392    pub zmag: f32,
16393    #[doc = "Absolute pressure"]
16394    pub abs_pressure: f32,
16395    #[doc = "Differential pressure (airspeed)"]
16396    pub diff_pressure: f32,
16397    #[doc = "Altitude calculated from pressure"]
16398    pub pressure_alt: f32,
16399    #[doc = "Temperature"]
16400    pub temperature: f32,
16401    #[doc = "Bitmap for fields that have updated since last message"]
16402    pub fields_updated: HilSensorUpdatedFlags,
16403    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16405    pub id: u8,
16406}
16407impl HIL_SENSOR_DATA {
16408    pub const ENCODED_LEN: usize = 65usize;
16409    pub const DEFAULT: Self = Self {
16410        time_usec: 0_u64,
16411        xacc: 0.0_f32,
16412        yacc: 0.0_f32,
16413        zacc: 0.0_f32,
16414        xgyro: 0.0_f32,
16415        ygyro: 0.0_f32,
16416        zgyro: 0.0_f32,
16417        xmag: 0.0_f32,
16418        ymag: 0.0_f32,
16419        zmag: 0.0_f32,
16420        abs_pressure: 0.0_f32,
16421        diff_pressure: 0.0_f32,
16422        pressure_alt: 0.0_f32,
16423        temperature: 0.0_f32,
16424        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16425        id: 0_u8,
16426    };
16427    #[cfg(feature = "arbitrary")]
16428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16429        use arbitrary::{Arbitrary, Unstructured};
16430        let mut buf = [0u8; 1024];
16431        rng.fill_bytes(&mut buf);
16432        let mut unstructured = Unstructured::new(&buf);
16433        Self::arbitrary(&mut unstructured).unwrap_or_default()
16434    }
16435}
16436impl Default for HIL_SENSOR_DATA {
16437    fn default() -> Self {
16438        Self::DEFAULT.clone()
16439    }
16440}
16441impl MessageData for HIL_SENSOR_DATA {
16442    type Message = MavMessage;
16443    const ID: u32 = 107u32;
16444    const NAME: &'static str = "HIL_SENSOR";
16445    const EXTRA_CRC: u8 = 108u8;
16446    const ENCODED_LEN: usize = 65usize;
16447    fn deser(
16448        _version: MavlinkVersion,
16449        __input: &[u8],
16450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16451        let avail_len = __input.len();
16452        let mut payload_buf = [0; Self::ENCODED_LEN];
16453        let mut buf = if avail_len < Self::ENCODED_LEN {
16454            payload_buf[0..avail_len].copy_from_slice(__input);
16455            Bytes::new(&payload_buf)
16456        } else {
16457            Bytes::new(__input)
16458        };
16459        let mut __struct = Self::default();
16460        __struct.time_usec = buf.get_u64_le();
16461        __struct.xacc = buf.get_f32_le();
16462        __struct.yacc = buf.get_f32_le();
16463        __struct.zacc = buf.get_f32_le();
16464        __struct.xgyro = buf.get_f32_le();
16465        __struct.ygyro = buf.get_f32_le();
16466        __struct.zgyro = buf.get_f32_le();
16467        __struct.xmag = buf.get_f32_le();
16468        __struct.ymag = buf.get_f32_le();
16469        __struct.zmag = buf.get_f32_le();
16470        __struct.abs_pressure = buf.get_f32_le();
16471        __struct.diff_pressure = buf.get_f32_le();
16472        __struct.pressure_alt = buf.get_f32_le();
16473        __struct.temperature = buf.get_f32_le();
16474        let tmp = buf.get_u32_le();
16475        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16476            tmp & HilSensorUpdatedFlags::all().bits(),
16477        )
16478        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16479            flag_type: "HilSensorUpdatedFlags",
16480            value: tmp as u32,
16481        })?;
16482        __struct.id = buf.get_u8();
16483        Ok(__struct)
16484    }
16485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16486        let mut __tmp = BytesMut::new(bytes);
16487        #[allow(clippy::absurd_extreme_comparisons)]
16488        #[allow(unused_comparisons)]
16489        if __tmp.remaining() < Self::ENCODED_LEN {
16490            panic!(
16491                "buffer is too small (need {} bytes, but got {})",
16492                Self::ENCODED_LEN,
16493                __tmp.remaining(),
16494            )
16495        }
16496        __tmp.put_u64_le(self.time_usec);
16497        __tmp.put_f32_le(self.xacc);
16498        __tmp.put_f32_le(self.yacc);
16499        __tmp.put_f32_le(self.zacc);
16500        __tmp.put_f32_le(self.xgyro);
16501        __tmp.put_f32_le(self.ygyro);
16502        __tmp.put_f32_le(self.zgyro);
16503        __tmp.put_f32_le(self.xmag);
16504        __tmp.put_f32_le(self.ymag);
16505        __tmp.put_f32_le(self.zmag);
16506        __tmp.put_f32_le(self.abs_pressure);
16507        __tmp.put_f32_le(self.diff_pressure);
16508        __tmp.put_f32_le(self.pressure_alt);
16509        __tmp.put_f32_le(self.temperature);
16510        __tmp.put_u32_le(self.fields_updated.bits());
16511        if matches!(version, MavlinkVersion::V2) {
16512            __tmp.put_u8(self.id);
16513            let len = __tmp.len();
16514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16515        } else {
16516            __tmp.len()
16517        }
16518    }
16519}
16520#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16521#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16522#[doc = ""]
16523#[doc = "ID: 90"]
16524#[derive(Debug, Clone, PartialEq)]
16525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16527#[cfg_attr(feature = "ts", derive(TS))]
16528#[cfg_attr(feature = "ts", ts(export))]
16529pub struct HIL_STATE_DATA {
16530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16531    pub time_usec: u64,
16532    #[doc = "Roll angle"]
16533    pub roll: f32,
16534    #[doc = "Pitch angle"]
16535    pub pitch: f32,
16536    #[doc = "Yaw angle"]
16537    pub yaw: f32,
16538    #[doc = "Body frame roll / phi angular speed"]
16539    pub rollspeed: f32,
16540    #[doc = "Body frame pitch / theta angular speed"]
16541    pub pitchspeed: f32,
16542    #[doc = "Body frame yaw / psi angular speed"]
16543    pub yawspeed: f32,
16544    #[doc = "Latitude"]
16545    pub lat: i32,
16546    #[doc = "Longitude"]
16547    pub lon: i32,
16548    #[doc = "Altitude"]
16549    pub alt: i32,
16550    #[doc = "Ground X Speed (Latitude)"]
16551    pub vx: i16,
16552    #[doc = "Ground Y Speed (Longitude)"]
16553    pub vy: i16,
16554    #[doc = "Ground Z Speed (Altitude)"]
16555    pub vz: i16,
16556    #[doc = "X acceleration"]
16557    pub xacc: i16,
16558    #[doc = "Y acceleration"]
16559    pub yacc: i16,
16560    #[doc = "Z acceleration"]
16561    pub zacc: i16,
16562}
16563impl HIL_STATE_DATA {
16564    pub const ENCODED_LEN: usize = 56usize;
16565    pub const DEFAULT: Self = Self {
16566        time_usec: 0_u64,
16567        roll: 0.0_f32,
16568        pitch: 0.0_f32,
16569        yaw: 0.0_f32,
16570        rollspeed: 0.0_f32,
16571        pitchspeed: 0.0_f32,
16572        yawspeed: 0.0_f32,
16573        lat: 0_i32,
16574        lon: 0_i32,
16575        alt: 0_i32,
16576        vx: 0_i16,
16577        vy: 0_i16,
16578        vz: 0_i16,
16579        xacc: 0_i16,
16580        yacc: 0_i16,
16581        zacc: 0_i16,
16582    };
16583    #[cfg(feature = "arbitrary")]
16584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16585        use arbitrary::{Arbitrary, Unstructured};
16586        let mut buf = [0u8; 1024];
16587        rng.fill_bytes(&mut buf);
16588        let mut unstructured = Unstructured::new(&buf);
16589        Self::arbitrary(&mut unstructured).unwrap_or_default()
16590    }
16591}
16592impl Default for HIL_STATE_DATA {
16593    fn default() -> Self {
16594        Self::DEFAULT.clone()
16595    }
16596}
16597impl MessageData for HIL_STATE_DATA {
16598    type Message = MavMessage;
16599    const ID: u32 = 90u32;
16600    const NAME: &'static str = "HIL_STATE";
16601    const EXTRA_CRC: u8 = 183u8;
16602    const ENCODED_LEN: usize = 56usize;
16603    fn deser(
16604        _version: MavlinkVersion,
16605        __input: &[u8],
16606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16607        let avail_len = __input.len();
16608        let mut payload_buf = [0; Self::ENCODED_LEN];
16609        let mut buf = if avail_len < Self::ENCODED_LEN {
16610            payload_buf[0..avail_len].copy_from_slice(__input);
16611            Bytes::new(&payload_buf)
16612        } else {
16613            Bytes::new(__input)
16614        };
16615        let mut __struct = Self::default();
16616        __struct.time_usec = buf.get_u64_le();
16617        __struct.roll = buf.get_f32_le();
16618        __struct.pitch = buf.get_f32_le();
16619        __struct.yaw = buf.get_f32_le();
16620        __struct.rollspeed = buf.get_f32_le();
16621        __struct.pitchspeed = buf.get_f32_le();
16622        __struct.yawspeed = buf.get_f32_le();
16623        __struct.lat = buf.get_i32_le();
16624        __struct.lon = buf.get_i32_le();
16625        __struct.alt = buf.get_i32_le();
16626        __struct.vx = buf.get_i16_le();
16627        __struct.vy = buf.get_i16_le();
16628        __struct.vz = buf.get_i16_le();
16629        __struct.xacc = buf.get_i16_le();
16630        __struct.yacc = buf.get_i16_le();
16631        __struct.zacc = buf.get_i16_le();
16632        Ok(__struct)
16633    }
16634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16635        let mut __tmp = BytesMut::new(bytes);
16636        #[allow(clippy::absurd_extreme_comparisons)]
16637        #[allow(unused_comparisons)]
16638        if __tmp.remaining() < Self::ENCODED_LEN {
16639            panic!(
16640                "buffer is too small (need {} bytes, but got {})",
16641                Self::ENCODED_LEN,
16642                __tmp.remaining(),
16643            )
16644        }
16645        __tmp.put_u64_le(self.time_usec);
16646        __tmp.put_f32_le(self.roll);
16647        __tmp.put_f32_le(self.pitch);
16648        __tmp.put_f32_le(self.yaw);
16649        __tmp.put_f32_le(self.rollspeed);
16650        __tmp.put_f32_le(self.pitchspeed);
16651        __tmp.put_f32_le(self.yawspeed);
16652        __tmp.put_i32_le(self.lat);
16653        __tmp.put_i32_le(self.lon);
16654        __tmp.put_i32_le(self.alt);
16655        __tmp.put_i16_le(self.vx);
16656        __tmp.put_i16_le(self.vy);
16657        __tmp.put_i16_le(self.vz);
16658        __tmp.put_i16_le(self.xacc);
16659        __tmp.put_i16_le(self.yacc);
16660        __tmp.put_i16_le(self.zacc);
16661        if matches!(version, MavlinkVersion::V2) {
16662            let len = __tmp.len();
16663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16664        } else {
16665            __tmp.len()
16666        }
16667    }
16668}
16669#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16670#[doc = ""]
16671#[doc = "ID: 115"]
16672#[derive(Debug, Clone, PartialEq)]
16673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16675#[cfg_attr(feature = "ts", derive(TS))]
16676#[cfg_attr(feature = "ts", ts(export))]
16677pub struct HIL_STATE_QUATERNION_DATA {
16678    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16679    pub time_usec: u64,
16680    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16683    pub attitude_quaternion: [f32; 4],
16684    #[doc = "Body frame roll / phi angular speed"]
16685    pub rollspeed: f32,
16686    #[doc = "Body frame pitch / theta angular speed"]
16687    pub pitchspeed: f32,
16688    #[doc = "Body frame yaw / psi angular speed"]
16689    pub yawspeed: f32,
16690    #[doc = "Latitude"]
16691    pub lat: i32,
16692    #[doc = "Longitude"]
16693    pub lon: i32,
16694    #[doc = "Altitude"]
16695    pub alt: i32,
16696    #[doc = "Ground X Speed (Latitude)"]
16697    pub vx: i16,
16698    #[doc = "Ground Y Speed (Longitude)"]
16699    pub vy: i16,
16700    #[doc = "Ground Z Speed (Altitude)"]
16701    pub vz: i16,
16702    #[doc = "Indicated airspeed"]
16703    pub ind_airspeed: u16,
16704    #[doc = "True airspeed"]
16705    pub true_airspeed: u16,
16706    #[doc = "X acceleration"]
16707    pub xacc: i16,
16708    #[doc = "Y acceleration"]
16709    pub yacc: i16,
16710    #[doc = "Z acceleration"]
16711    pub zacc: i16,
16712}
16713impl HIL_STATE_QUATERNION_DATA {
16714    pub const ENCODED_LEN: usize = 64usize;
16715    pub const DEFAULT: Self = Self {
16716        time_usec: 0_u64,
16717        attitude_quaternion: [0.0_f32; 4usize],
16718        rollspeed: 0.0_f32,
16719        pitchspeed: 0.0_f32,
16720        yawspeed: 0.0_f32,
16721        lat: 0_i32,
16722        lon: 0_i32,
16723        alt: 0_i32,
16724        vx: 0_i16,
16725        vy: 0_i16,
16726        vz: 0_i16,
16727        ind_airspeed: 0_u16,
16728        true_airspeed: 0_u16,
16729        xacc: 0_i16,
16730        yacc: 0_i16,
16731        zacc: 0_i16,
16732    };
16733    #[cfg(feature = "arbitrary")]
16734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16735        use arbitrary::{Arbitrary, Unstructured};
16736        let mut buf = [0u8; 1024];
16737        rng.fill_bytes(&mut buf);
16738        let mut unstructured = Unstructured::new(&buf);
16739        Self::arbitrary(&mut unstructured).unwrap_or_default()
16740    }
16741}
16742impl Default for HIL_STATE_QUATERNION_DATA {
16743    fn default() -> Self {
16744        Self::DEFAULT.clone()
16745    }
16746}
16747impl MessageData for HIL_STATE_QUATERNION_DATA {
16748    type Message = MavMessage;
16749    const ID: u32 = 115u32;
16750    const NAME: &'static str = "HIL_STATE_QUATERNION";
16751    const EXTRA_CRC: u8 = 4u8;
16752    const ENCODED_LEN: usize = 64usize;
16753    fn deser(
16754        _version: MavlinkVersion,
16755        __input: &[u8],
16756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16757        let avail_len = __input.len();
16758        let mut payload_buf = [0; Self::ENCODED_LEN];
16759        let mut buf = if avail_len < Self::ENCODED_LEN {
16760            payload_buf[0..avail_len].copy_from_slice(__input);
16761            Bytes::new(&payload_buf)
16762        } else {
16763            Bytes::new(__input)
16764        };
16765        let mut __struct = Self::default();
16766        __struct.time_usec = buf.get_u64_le();
16767        for v in &mut __struct.attitude_quaternion {
16768            let val = buf.get_f32_le();
16769            *v = val;
16770        }
16771        __struct.rollspeed = buf.get_f32_le();
16772        __struct.pitchspeed = buf.get_f32_le();
16773        __struct.yawspeed = buf.get_f32_le();
16774        __struct.lat = buf.get_i32_le();
16775        __struct.lon = buf.get_i32_le();
16776        __struct.alt = buf.get_i32_le();
16777        __struct.vx = buf.get_i16_le();
16778        __struct.vy = buf.get_i16_le();
16779        __struct.vz = buf.get_i16_le();
16780        __struct.ind_airspeed = buf.get_u16_le();
16781        __struct.true_airspeed = buf.get_u16_le();
16782        __struct.xacc = buf.get_i16_le();
16783        __struct.yacc = buf.get_i16_le();
16784        __struct.zacc = buf.get_i16_le();
16785        Ok(__struct)
16786    }
16787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16788        let mut __tmp = BytesMut::new(bytes);
16789        #[allow(clippy::absurd_extreme_comparisons)]
16790        #[allow(unused_comparisons)]
16791        if __tmp.remaining() < Self::ENCODED_LEN {
16792            panic!(
16793                "buffer is too small (need {} bytes, but got {})",
16794                Self::ENCODED_LEN,
16795                __tmp.remaining(),
16796            )
16797        }
16798        __tmp.put_u64_le(self.time_usec);
16799        for val in &self.attitude_quaternion {
16800            __tmp.put_f32_le(*val);
16801        }
16802        __tmp.put_f32_le(self.rollspeed);
16803        __tmp.put_f32_le(self.pitchspeed);
16804        __tmp.put_f32_le(self.yawspeed);
16805        __tmp.put_i32_le(self.lat);
16806        __tmp.put_i32_le(self.lon);
16807        __tmp.put_i32_le(self.alt);
16808        __tmp.put_i16_le(self.vx);
16809        __tmp.put_i16_le(self.vy);
16810        __tmp.put_i16_le(self.vz);
16811        __tmp.put_u16_le(self.ind_airspeed);
16812        __tmp.put_u16_le(self.true_airspeed);
16813        __tmp.put_i16_le(self.xacc);
16814        __tmp.put_i16_le(self.yacc);
16815        __tmp.put_i16_le(self.zacc);
16816        if matches!(version, MavlinkVersion::V2) {
16817            let len = __tmp.len();
16818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16819        } else {
16820            __tmp.len()
16821        }
16822    }
16823}
16824#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16825#[doc = ""]
16826#[doc = "ID: 242"]
16827#[derive(Debug, Clone, PartialEq)]
16828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16830#[cfg_attr(feature = "ts", derive(TS))]
16831#[cfg_attr(feature = "ts", ts(export))]
16832pub struct HOME_POSITION_DATA {
16833    #[doc = "Latitude (WGS84)"]
16834    pub latitude: i32,
16835    #[doc = "Longitude (WGS84)"]
16836    pub longitude: i32,
16837    #[doc = "Altitude (MSL). Positive for up."]
16838    pub altitude: i32,
16839    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16840    pub x: f32,
16841    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16842    pub y: f32,
16843    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16844    pub z: f32,
16845    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16848    pub q: [f32; 4],
16849    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16850    pub approach_x: f32,
16851    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16852    pub approach_y: f32,
16853    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16854    pub approach_z: f32,
16855    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16857    pub time_usec: u64,
16858}
16859impl HOME_POSITION_DATA {
16860    pub const ENCODED_LEN: usize = 60usize;
16861    pub const DEFAULT: Self = Self {
16862        latitude: 0_i32,
16863        longitude: 0_i32,
16864        altitude: 0_i32,
16865        x: 0.0_f32,
16866        y: 0.0_f32,
16867        z: 0.0_f32,
16868        q: [0.0_f32; 4usize],
16869        approach_x: 0.0_f32,
16870        approach_y: 0.0_f32,
16871        approach_z: 0.0_f32,
16872        time_usec: 0_u64,
16873    };
16874    #[cfg(feature = "arbitrary")]
16875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16876        use arbitrary::{Arbitrary, Unstructured};
16877        let mut buf = [0u8; 1024];
16878        rng.fill_bytes(&mut buf);
16879        let mut unstructured = Unstructured::new(&buf);
16880        Self::arbitrary(&mut unstructured).unwrap_or_default()
16881    }
16882}
16883impl Default for HOME_POSITION_DATA {
16884    fn default() -> Self {
16885        Self::DEFAULT.clone()
16886    }
16887}
16888impl MessageData for HOME_POSITION_DATA {
16889    type Message = MavMessage;
16890    const ID: u32 = 242u32;
16891    const NAME: &'static str = "HOME_POSITION";
16892    const EXTRA_CRC: u8 = 104u8;
16893    const ENCODED_LEN: usize = 60usize;
16894    fn deser(
16895        _version: MavlinkVersion,
16896        __input: &[u8],
16897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16898        let avail_len = __input.len();
16899        let mut payload_buf = [0; Self::ENCODED_LEN];
16900        let mut buf = if avail_len < Self::ENCODED_LEN {
16901            payload_buf[0..avail_len].copy_from_slice(__input);
16902            Bytes::new(&payload_buf)
16903        } else {
16904            Bytes::new(__input)
16905        };
16906        let mut __struct = Self::default();
16907        __struct.latitude = buf.get_i32_le();
16908        __struct.longitude = buf.get_i32_le();
16909        __struct.altitude = buf.get_i32_le();
16910        __struct.x = buf.get_f32_le();
16911        __struct.y = buf.get_f32_le();
16912        __struct.z = buf.get_f32_le();
16913        for v in &mut __struct.q {
16914            let val = buf.get_f32_le();
16915            *v = val;
16916        }
16917        __struct.approach_x = buf.get_f32_le();
16918        __struct.approach_y = buf.get_f32_le();
16919        __struct.approach_z = buf.get_f32_le();
16920        __struct.time_usec = buf.get_u64_le();
16921        Ok(__struct)
16922    }
16923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16924        let mut __tmp = BytesMut::new(bytes);
16925        #[allow(clippy::absurd_extreme_comparisons)]
16926        #[allow(unused_comparisons)]
16927        if __tmp.remaining() < Self::ENCODED_LEN {
16928            panic!(
16929                "buffer is too small (need {} bytes, but got {})",
16930                Self::ENCODED_LEN,
16931                __tmp.remaining(),
16932            )
16933        }
16934        __tmp.put_i32_le(self.latitude);
16935        __tmp.put_i32_le(self.longitude);
16936        __tmp.put_i32_le(self.altitude);
16937        __tmp.put_f32_le(self.x);
16938        __tmp.put_f32_le(self.y);
16939        __tmp.put_f32_le(self.z);
16940        for val in &self.q {
16941            __tmp.put_f32_le(*val);
16942        }
16943        __tmp.put_f32_le(self.approach_x);
16944        __tmp.put_f32_le(self.approach_y);
16945        __tmp.put_f32_le(self.approach_z);
16946        if matches!(version, MavlinkVersion::V2) {
16947            __tmp.put_u64_le(self.time_usec);
16948            let len = __tmp.len();
16949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16950        } else {
16951            __tmp.len()
16952        }
16953    }
16954}
16955#[doc = "Temperature and humidity from hygrometer."]
16956#[doc = ""]
16957#[doc = "ID: 12920"]
16958#[derive(Debug, Clone, PartialEq)]
16959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16961#[cfg_attr(feature = "ts", derive(TS))]
16962#[cfg_attr(feature = "ts", ts(export))]
16963pub struct HYGROMETER_SENSOR_DATA {
16964    #[doc = "Temperature"]
16965    pub temperature: i16,
16966    #[doc = "Humidity"]
16967    pub humidity: u16,
16968    #[doc = "Hygrometer ID"]
16969    pub id: u8,
16970}
16971impl HYGROMETER_SENSOR_DATA {
16972    pub const ENCODED_LEN: usize = 5usize;
16973    pub const DEFAULT: Self = Self {
16974        temperature: 0_i16,
16975        humidity: 0_u16,
16976        id: 0_u8,
16977    };
16978    #[cfg(feature = "arbitrary")]
16979    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16980        use arbitrary::{Arbitrary, Unstructured};
16981        let mut buf = [0u8; 1024];
16982        rng.fill_bytes(&mut buf);
16983        let mut unstructured = Unstructured::new(&buf);
16984        Self::arbitrary(&mut unstructured).unwrap_or_default()
16985    }
16986}
16987impl Default for HYGROMETER_SENSOR_DATA {
16988    fn default() -> Self {
16989        Self::DEFAULT.clone()
16990    }
16991}
16992impl MessageData for HYGROMETER_SENSOR_DATA {
16993    type Message = MavMessage;
16994    const ID: u32 = 12920u32;
16995    const NAME: &'static str = "HYGROMETER_SENSOR";
16996    const EXTRA_CRC: u8 = 20u8;
16997    const ENCODED_LEN: usize = 5usize;
16998    fn deser(
16999        _version: MavlinkVersion,
17000        __input: &[u8],
17001    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17002        let avail_len = __input.len();
17003        let mut payload_buf = [0; Self::ENCODED_LEN];
17004        let mut buf = if avail_len < Self::ENCODED_LEN {
17005            payload_buf[0..avail_len].copy_from_slice(__input);
17006            Bytes::new(&payload_buf)
17007        } else {
17008            Bytes::new(__input)
17009        };
17010        let mut __struct = Self::default();
17011        __struct.temperature = buf.get_i16_le();
17012        __struct.humidity = buf.get_u16_le();
17013        __struct.id = buf.get_u8();
17014        Ok(__struct)
17015    }
17016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17017        let mut __tmp = BytesMut::new(bytes);
17018        #[allow(clippy::absurd_extreme_comparisons)]
17019        #[allow(unused_comparisons)]
17020        if __tmp.remaining() < Self::ENCODED_LEN {
17021            panic!(
17022                "buffer is too small (need {} bytes, but got {})",
17023                Self::ENCODED_LEN,
17024                __tmp.remaining(),
17025            )
17026        }
17027        __tmp.put_i16_le(self.temperature);
17028        __tmp.put_u16_le(self.humidity);
17029        __tmp.put_u8(self.id);
17030        if matches!(version, MavlinkVersion::V2) {
17031            let len = __tmp.len();
17032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17033        } else {
17034            __tmp.len()
17035        }
17036    }
17037}
17038#[doc = "Illuminator status."]
17039#[doc = ""]
17040#[doc = "ID: 440"]
17041#[derive(Debug, Clone, PartialEq)]
17042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17044#[cfg_attr(feature = "ts", derive(TS))]
17045#[cfg_attr(feature = "ts", ts(export))]
17046pub struct ILLUMINATOR_STATUS_DATA {
17047    #[doc = "Time since the start-up of the illuminator in ms"]
17048    pub uptime_ms: u32,
17049    #[doc = "Errors"]
17050    pub error_status: IlluminatorErrorFlags,
17051    #[doc = "Illuminator brightness"]
17052    pub brightness: f32,
17053    #[doc = "Illuminator strobing period in seconds"]
17054    pub strobe_period: f32,
17055    #[doc = "Illuminator strobing duty cycle"]
17056    pub strobe_duty_cycle: f32,
17057    #[doc = "Temperature in Celsius"]
17058    pub temp_c: f32,
17059    #[doc = "Minimum strobing period in seconds"]
17060    pub min_strobe_period: f32,
17061    #[doc = "Maximum strobing period in seconds"]
17062    pub max_strobe_period: f32,
17063    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17064    pub enable: u8,
17065    #[doc = "Supported illuminator modes"]
17066    pub mode_bitmask: IlluminatorMode,
17067    #[doc = "Illuminator mode"]
17068    pub mode: IlluminatorMode,
17069}
17070impl ILLUMINATOR_STATUS_DATA {
17071    pub const ENCODED_LEN: usize = 35usize;
17072    pub const DEFAULT: Self = Self {
17073        uptime_ms: 0_u32,
17074        error_status: IlluminatorErrorFlags::DEFAULT,
17075        brightness: 0.0_f32,
17076        strobe_period: 0.0_f32,
17077        strobe_duty_cycle: 0.0_f32,
17078        temp_c: 0.0_f32,
17079        min_strobe_period: 0.0_f32,
17080        max_strobe_period: 0.0_f32,
17081        enable: 0_u8,
17082        mode_bitmask: IlluminatorMode::DEFAULT,
17083        mode: IlluminatorMode::DEFAULT,
17084    };
17085    #[cfg(feature = "arbitrary")]
17086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17087        use arbitrary::{Arbitrary, Unstructured};
17088        let mut buf = [0u8; 1024];
17089        rng.fill_bytes(&mut buf);
17090        let mut unstructured = Unstructured::new(&buf);
17091        Self::arbitrary(&mut unstructured).unwrap_or_default()
17092    }
17093}
17094impl Default for ILLUMINATOR_STATUS_DATA {
17095    fn default() -> Self {
17096        Self::DEFAULT.clone()
17097    }
17098}
17099impl MessageData for ILLUMINATOR_STATUS_DATA {
17100    type Message = MavMessage;
17101    const ID: u32 = 440u32;
17102    const NAME: &'static str = "ILLUMINATOR_STATUS";
17103    const EXTRA_CRC: u8 = 66u8;
17104    const ENCODED_LEN: usize = 35usize;
17105    fn deser(
17106        _version: MavlinkVersion,
17107        __input: &[u8],
17108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17109        let avail_len = __input.len();
17110        let mut payload_buf = [0; Self::ENCODED_LEN];
17111        let mut buf = if avail_len < Self::ENCODED_LEN {
17112            payload_buf[0..avail_len].copy_from_slice(__input);
17113            Bytes::new(&payload_buf)
17114        } else {
17115            Bytes::new(__input)
17116        };
17117        let mut __struct = Self::default();
17118        __struct.uptime_ms = buf.get_u32_le();
17119        let tmp = buf.get_u32_le();
17120        __struct.error_status = IlluminatorErrorFlags::from_bits(
17121            tmp & IlluminatorErrorFlags::all().bits(),
17122        )
17123        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17124            flag_type: "IlluminatorErrorFlags",
17125            value: tmp as u32,
17126        })?;
17127        __struct.brightness = buf.get_f32_le();
17128        __struct.strobe_period = buf.get_f32_le();
17129        __struct.strobe_duty_cycle = buf.get_f32_le();
17130        __struct.temp_c = buf.get_f32_le();
17131        __struct.min_strobe_period = buf.get_f32_le();
17132        __struct.max_strobe_period = buf.get_f32_le();
17133        __struct.enable = buf.get_u8();
17134        let tmp = buf.get_u8();
17135        __struct.mode_bitmask =
17136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17137                enum_type: "IlluminatorMode",
17138                value: tmp as u32,
17139            })?;
17140        let tmp = buf.get_u8();
17141        __struct.mode =
17142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17143                enum_type: "IlluminatorMode",
17144                value: tmp as u32,
17145            })?;
17146        Ok(__struct)
17147    }
17148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17149        let mut __tmp = BytesMut::new(bytes);
17150        #[allow(clippy::absurd_extreme_comparisons)]
17151        #[allow(unused_comparisons)]
17152        if __tmp.remaining() < Self::ENCODED_LEN {
17153            panic!(
17154                "buffer is too small (need {} bytes, but got {})",
17155                Self::ENCODED_LEN,
17156                __tmp.remaining(),
17157            )
17158        }
17159        __tmp.put_u32_le(self.uptime_ms);
17160        __tmp.put_u32_le(self.error_status.bits());
17161        __tmp.put_f32_le(self.brightness);
17162        __tmp.put_f32_le(self.strobe_period);
17163        __tmp.put_f32_le(self.strobe_duty_cycle);
17164        __tmp.put_f32_le(self.temp_c);
17165        __tmp.put_f32_le(self.min_strobe_period);
17166        __tmp.put_f32_le(self.max_strobe_period);
17167        __tmp.put_u8(self.enable);
17168        __tmp.put_u8(self.mode_bitmask as u8);
17169        __tmp.put_u8(self.mode as u8);
17170        if matches!(version, MavlinkVersion::V2) {
17171            let len = __tmp.len();
17172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17173        } else {
17174            __tmp.len()
17175        }
17176    }
17177}
17178#[doc = "Status of the Iridium SBD link."]
17179#[doc = ""]
17180#[doc = "ID: 335"]
17181#[derive(Debug, Clone, PartialEq)]
17182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17184#[cfg_attr(feature = "ts", derive(TS))]
17185#[cfg_attr(feature = "ts", ts(export))]
17186pub struct ISBD_LINK_STATUS_DATA {
17187    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17188    pub timestamp: u64,
17189    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17190    pub last_heartbeat: u64,
17191    #[doc = "Number of failed SBD sessions."]
17192    pub failed_sessions: u16,
17193    #[doc = "Number of successful SBD sessions."]
17194    pub successful_sessions: u16,
17195    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17196    pub signal_quality: u8,
17197    #[doc = "1: Ring call pending, 0: No call pending."]
17198    pub ring_pending: u8,
17199    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17200    pub tx_session_pending: u8,
17201    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17202    pub rx_session_pending: u8,
17203}
17204impl ISBD_LINK_STATUS_DATA {
17205    pub const ENCODED_LEN: usize = 24usize;
17206    pub const DEFAULT: Self = Self {
17207        timestamp: 0_u64,
17208        last_heartbeat: 0_u64,
17209        failed_sessions: 0_u16,
17210        successful_sessions: 0_u16,
17211        signal_quality: 0_u8,
17212        ring_pending: 0_u8,
17213        tx_session_pending: 0_u8,
17214        rx_session_pending: 0_u8,
17215    };
17216    #[cfg(feature = "arbitrary")]
17217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17218        use arbitrary::{Arbitrary, Unstructured};
17219        let mut buf = [0u8; 1024];
17220        rng.fill_bytes(&mut buf);
17221        let mut unstructured = Unstructured::new(&buf);
17222        Self::arbitrary(&mut unstructured).unwrap_or_default()
17223    }
17224}
17225impl Default for ISBD_LINK_STATUS_DATA {
17226    fn default() -> Self {
17227        Self::DEFAULT.clone()
17228    }
17229}
17230impl MessageData for ISBD_LINK_STATUS_DATA {
17231    type Message = MavMessage;
17232    const ID: u32 = 335u32;
17233    const NAME: &'static str = "ISBD_LINK_STATUS";
17234    const EXTRA_CRC: u8 = 225u8;
17235    const ENCODED_LEN: usize = 24usize;
17236    fn deser(
17237        _version: MavlinkVersion,
17238        __input: &[u8],
17239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17240        let avail_len = __input.len();
17241        let mut payload_buf = [0; Self::ENCODED_LEN];
17242        let mut buf = if avail_len < Self::ENCODED_LEN {
17243            payload_buf[0..avail_len].copy_from_slice(__input);
17244            Bytes::new(&payload_buf)
17245        } else {
17246            Bytes::new(__input)
17247        };
17248        let mut __struct = Self::default();
17249        __struct.timestamp = buf.get_u64_le();
17250        __struct.last_heartbeat = buf.get_u64_le();
17251        __struct.failed_sessions = buf.get_u16_le();
17252        __struct.successful_sessions = buf.get_u16_le();
17253        __struct.signal_quality = buf.get_u8();
17254        __struct.ring_pending = buf.get_u8();
17255        __struct.tx_session_pending = buf.get_u8();
17256        __struct.rx_session_pending = buf.get_u8();
17257        Ok(__struct)
17258    }
17259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17260        let mut __tmp = BytesMut::new(bytes);
17261        #[allow(clippy::absurd_extreme_comparisons)]
17262        #[allow(unused_comparisons)]
17263        if __tmp.remaining() < Self::ENCODED_LEN {
17264            panic!(
17265                "buffer is too small (need {} bytes, but got {})",
17266                Self::ENCODED_LEN,
17267                __tmp.remaining(),
17268            )
17269        }
17270        __tmp.put_u64_le(self.timestamp);
17271        __tmp.put_u64_le(self.last_heartbeat);
17272        __tmp.put_u16_le(self.failed_sessions);
17273        __tmp.put_u16_le(self.successful_sessions);
17274        __tmp.put_u8(self.signal_quality);
17275        __tmp.put_u8(self.ring_pending);
17276        __tmp.put_u8(self.tx_session_pending);
17277        __tmp.put_u8(self.rx_session_pending);
17278        if matches!(version, MavlinkVersion::V2) {
17279            let len = __tmp.len();
17280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17281        } else {
17282            __tmp.len()
17283        }
17284    }
17285}
17286#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17287#[doc = ""]
17288#[doc = "ID: 149"]
17289#[derive(Debug, Clone, PartialEq)]
17290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17292#[cfg_attr(feature = "ts", derive(TS))]
17293#[cfg_attr(feature = "ts", ts(export))]
17294pub struct LANDING_TARGET_DATA {
17295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17296    pub time_usec: u64,
17297    #[doc = "X-axis angular offset of the target from the center of the image"]
17298    pub angle_x: f32,
17299    #[doc = "Y-axis angular offset of the target from the center of the image"]
17300    pub angle_y: f32,
17301    #[doc = "Distance to the target from the vehicle"]
17302    pub distance: f32,
17303    #[doc = "Size of target along x-axis"]
17304    pub size_x: f32,
17305    #[doc = "Size of target along y-axis"]
17306    pub size_y: f32,
17307    #[doc = "The ID of the target if multiple targets are present"]
17308    pub target_num: u8,
17309    #[doc = "Coordinate frame used for following fields."]
17310    pub frame: MavFrame,
17311    #[doc = "X Position of the landing target in MAV_FRAME"]
17312    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17313    pub x: f32,
17314    #[doc = "Y Position of the landing target in MAV_FRAME"]
17315    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17316    pub y: f32,
17317    #[doc = "Z Position of the landing target in MAV_FRAME"]
17318    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17319    pub z: f32,
17320    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17321    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17324    pub q: [f32; 4],
17325    #[doc = "Type of landing target"]
17326    #[cfg_attr(feature = "serde", serde(default))]
17327    pub mavtype: LandingTargetType,
17328    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17330    pub position_valid: u8,
17331}
17332impl LANDING_TARGET_DATA {
17333    pub const ENCODED_LEN: usize = 60usize;
17334    pub const DEFAULT: Self = Self {
17335        time_usec: 0_u64,
17336        angle_x: 0.0_f32,
17337        angle_y: 0.0_f32,
17338        distance: 0.0_f32,
17339        size_x: 0.0_f32,
17340        size_y: 0.0_f32,
17341        target_num: 0_u8,
17342        frame: MavFrame::DEFAULT,
17343        x: 0.0_f32,
17344        y: 0.0_f32,
17345        z: 0.0_f32,
17346        q: [0.0_f32; 4usize],
17347        mavtype: LandingTargetType::DEFAULT,
17348        position_valid: 0_u8,
17349    };
17350    #[cfg(feature = "arbitrary")]
17351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17352        use arbitrary::{Arbitrary, Unstructured};
17353        let mut buf = [0u8; 1024];
17354        rng.fill_bytes(&mut buf);
17355        let mut unstructured = Unstructured::new(&buf);
17356        Self::arbitrary(&mut unstructured).unwrap_or_default()
17357    }
17358}
17359impl Default for LANDING_TARGET_DATA {
17360    fn default() -> Self {
17361        Self::DEFAULT.clone()
17362    }
17363}
17364impl MessageData for LANDING_TARGET_DATA {
17365    type Message = MavMessage;
17366    const ID: u32 = 149u32;
17367    const NAME: &'static str = "LANDING_TARGET";
17368    const EXTRA_CRC: u8 = 200u8;
17369    const ENCODED_LEN: usize = 60usize;
17370    fn deser(
17371        _version: MavlinkVersion,
17372        __input: &[u8],
17373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17374        let avail_len = __input.len();
17375        let mut payload_buf = [0; Self::ENCODED_LEN];
17376        let mut buf = if avail_len < Self::ENCODED_LEN {
17377            payload_buf[0..avail_len].copy_from_slice(__input);
17378            Bytes::new(&payload_buf)
17379        } else {
17380            Bytes::new(__input)
17381        };
17382        let mut __struct = Self::default();
17383        __struct.time_usec = buf.get_u64_le();
17384        __struct.angle_x = buf.get_f32_le();
17385        __struct.angle_y = buf.get_f32_le();
17386        __struct.distance = buf.get_f32_le();
17387        __struct.size_x = buf.get_f32_le();
17388        __struct.size_y = buf.get_f32_le();
17389        __struct.target_num = buf.get_u8();
17390        let tmp = buf.get_u8();
17391        __struct.frame =
17392            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17393                enum_type: "MavFrame",
17394                value: tmp as u32,
17395            })?;
17396        __struct.x = buf.get_f32_le();
17397        __struct.y = buf.get_f32_le();
17398        __struct.z = buf.get_f32_le();
17399        for v in &mut __struct.q {
17400            let val = buf.get_f32_le();
17401            *v = val;
17402        }
17403        let tmp = buf.get_u8();
17404        __struct.mavtype =
17405            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17406                enum_type: "LandingTargetType",
17407                value: tmp as u32,
17408            })?;
17409        __struct.position_valid = buf.get_u8();
17410        Ok(__struct)
17411    }
17412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17413        let mut __tmp = BytesMut::new(bytes);
17414        #[allow(clippy::absurd_extreme_comparisons)]
17415        #[allow(unused_comparisons)]
17416        if __tmp.remaining() < Self::ENCODED_LEN {
17417            panic!(
17418                "buffer is too small (need {} bytes, but got {})",
17419                Self::ENCODED_LEN,
17420                __tmp.remaining(),
17421            )
17422        }
17423        __tmp.put_u64_le(self.time_usec);
17424        __tmp.put_f32_le(self.angle_x);
17425        __tmp.put_f32_le(self.angle_y);
17426        __tmp.put_f32_le(self.distance);
17427        __tmp.put_f32_le(self.size_x);
17428        __tmp.put_f32_le(self.size_y);
17429        __tmp.put_u8(self.target_num);
17430        __tmp.put_u8(self.frame as u8);
17431        if matches!(version, MavlinkVersion::V2) {
17432            __tmp.put_f32_le(self.x);
17433            __tmp.put_f32_le(self.y);
17434            __tmp.put_f32_le(self.z);
17435            for val in &self.q {
17436                __tmp.put_f32_le(*val);
17437            }
17438            __tmp.put_u8(self.mavtype as u8);
17439            __tmp.put_u8(self.position_valid);
17440            let len = __tmp.len();
17441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17442        } else {
17443            __tmp.len()
17444        }
17445    }
17446}
17447#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17448#[doc = ""]
17449#[doc = "ID: 8"]
17450#[derive(Debug, Clone, PartialEq)]
17451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17453#[cfg_attr(feature = "ts", derive(TS))]
17454#[cfg_attr(feature = "ts", ts(export))]
17455pub struct LINK_NODE_STATUS_DATA {
17456    #[doc = "Timestamp (time since system boot)."]
17457    pub timestamp: u64,
17458    #[doc = "Transmit rate"]
17459    pub tx_rate: u32,
17460    #[doc = "Receive rate"]
17461    pub rx_rate: u32,
17462    #[doc = "Messages sent"]
17463    pub messages_sent: u32,
17464    #[doc = "Messages received (estimated from counting seq)"]
17465    pub messages_received: u32,
17466    #[doc = "Messages lost (estimated from counting seq)"]
17467    pub messages_lost: u32,
17468    #[doc = "Number of bytes that could not be parsed correctly."]
17469    pub rx_parse_err: u16,
17470    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17471    pub tx_overflows: u16,
17472    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17473    pub rx_overflows: u16,
17474    #[doc = "Remaining free transmit buffer space"]
17475    pub tx_buf: u8,
17476    #[doc = "Remaining free receive buffer space"]
17477    pub rx_buf: u8,
17478}
17479impl LINK_NODE_STATUS_DATA {
17480    pub const ENCODED_LEN: usize = 36usize;
17481    pub const DEFAULT: Self = Self {
17482        timestamp: 0_u64,
17483        tx_rate: 0_u32,
17484        rx_rate: 0_u32,
17485        messages_sent: 0_u32,
17486        messages_received: 0_u32,
17487        messages_lost: 0_u32,
17488        rx_parse_err: 0_u16,
17489        tx_overflows: 0_u16,
17490        rx_overflows: 0_u16,
17491        tx_buf: 0_u8,
17492        rx_buf: 0_u8,
17493    };
17494    #[cfg(feature = "arbitrary")]
17495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17496        use arbitrary::{Arbitrary, Unstructured};
17497        let mut buf = [0u8; 1024];
17498        rng.fill_bytes(&mut buf);
17499        let mut unstructured = Unstructured::new(&buf);
17500        Self::arbitrary(&mut unstructured).unwrap_or_default()
17501    }
17502}
17503impl Default for LINK_NODE_STATUS_DATA {
17504    fn default() -> Self {
17505        Self::DEFAULT.clone()
17506    }
17507}
17508impl MessageData for LINK_NODE_STATUS_DATA {
17509    type Message = MavMessage;
17510    const ID: u32 = 8u32;
17511    const NAME: &'static str = "LINK_NODE_STATUS";
17512    const EXTRA_CRC: u8 = 117u8;
17513    const ENCODED_LEN: usize = 36usize;
17514    fn deser(
17515        _version: MavlinkVersion,
17516        __input: &[u8],
17517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17518        let avail_len = __input.len();
17519        let mut payload_buf = [0; Self::ENCODED_LEN];
17520        let mut buf = if avail_len < Self::ENCODED_LEN {
17521            payload_buf[0..avail_len].copy_from_slice(__input);
17522            Bytes::new(&payload_buf)
17523        } else {
17524            Bytes::new(__input)
17525        };
17526        let mut __struct = Self::default();
17527        __struct.timestamp = buf.get_u64_le();
17528        __struct.tx_rate = buf.get_u32_le();
17529        __struct.rx_rate = buf.get_u32_le();
17530        __struct.messages_sent = buf.get_u32_le();
17531        __struct.messages_received = buf.get_u32_le();
17532        __struct.messages_lost = buf.get_u32_le();
17533        __struct.rx_parse_err = buf.get_u16_le();
17534        __struct.tx_overflows = buf.get_u16_le();
17535        __struct.rx_overflows = buf.get_u16_le();
17536        __struct.tx_buf = buf.get_u8();
17537        __struct.rx_buf = buf.get_u8();
17538        Ok(__struct)
17539    }
17540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17541        let mut __tmp = BytesMut::new(bytes);
17542        #[allow(clippy::absurd_extreme_comparisons)]
17543        #[allow(unused_comparisons)]
17544        if __tmp.remaining() < Self::ENCODED_LEN {
17545            panic!(
17546                "buffer is too small (need {} bytes, but got {})",
17547                Self::ENCODED_LEN,
17548                __tmp.remaining(),
17549            )
17550        }
17551        __tmp.put_u64_le(self.timestamp);
17552        __tmp.put_u32_le(self.tx_rate);
17553        __tmp.put_u32_le(self.rx_rate);
17554        __tmp.put_u32_le(self.messages_sent);
17555        __tmp.put_u32_le(self.messages_received);
17556        __tmp.put_u32_le(self.messages_lost);
17557        __tmp.put_u16_le(self.rx_parse_err);
17558        __tmp.put_u16_le(self.tx_overflows);
17559        __tmp.put_u16_le(self.rx_overflows);
17560        __tmp.put_u8(self.tx_buf);
17561        __tmp.put_u8(self.rx_buf);
17562        if matches!(version, MavlinkVersion::V2) {
17563            let len = __tmp.len();
17564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17565        } else {
17566            __tmp.len()
17567        }
17568    }
17569}
17570#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17571#[doc = ""]
17572#[doc = "ID: 32"]
17573#[derive(Debug, Clone, PartialEq)]
17574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17576#[cfg_attr(feature = "ts", derive(TS))]
17577#[cfg_attr(feature = "ts", ts(export))]
17578pub struct LOCAL_POSITION_NED_DATA {
17579    #[doc = "Timestamp (time since system boot)."]
17580    pub time_boot_ms: u32,
17581    #[doc = "X Position"]
17582    pub x: f32,
17583    #[doc = "Y Position"]
17584    pub y: f32,
17585    #[doc = "Z Position"]
17586    pub z: f32,
17587    #[doc = "X Speed"]
17588    pub vx: f32,
17589    #[doc = "Y Speed"]
17590    pub vy: f32,
17591    #[doc = "Z Speed"]
17592    pub vz: f32,
17593}
17594impl LOCAL_POSITION_NED_DATA {
17595    pub const ENCODED_LEN: usize = 28usize;
17596    pub const DEFAULT: Self = Self {
17597        time_boot_ms: 0_u32,
17598        x: 0.0_f32,
17599        y: 0.0_f32,
17600        z: 0.0_f32,
17601        vx: 0.0_f32,
17602        vy: 0.0_f32,
17603        vz: 0.0_f32,
17604    };
17605    #[cfg(feature = "arbitrary")]
17606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17607        use arbitrary::{Arbitrary, Unstructured};
17608        let mut buf = [0u8; 1024];
17609        rng.fill_bytes(&mut buf);
17610        let mut unstructured = Unstructured::new(&buf);
17611        Self::arbitrary(&mut unstructured).unwrap_or_default()
17612    }
17613}
17614impl Default for LOCAL_POSITION_NED_DATA {
17615    fn default() -> Self {
17616        Self::DEFAULT.clone()
17617    }
17618}
17619impl MessageData for LOCAL_POSITION_NED_DATA {
17620    type Message = MavMessage;
17621    const ID: u32 = 32u32;
17622    const NAME: &'static str = "LOCAL_POSITION_NED";
17623    const EXTRA_CRC: u8 = 185u8;
17624    const ENCODED_LEN: usize = 28usize;
17625    fn deser(
17626        _version: MavlinkVersion,
17627        __input: &[u8],
17628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17629        let avail_len = __input.len();
17630        let mut payload_buf = [0; Self::ENCODED_LEN];
17631        let mut buf = if avail_len < Self::ENCODED_LEN {
17632            payload_buf[0..avail_len].copy_from_slice(__input);
17633            Bytes::new(&payload_buf)
17634        } else {
17635            Bytes::new(__input)
17636        };
17637        let mut __struct = Self::default();
17638        __struct.time_boot_ms = buf.get_u32_le();
17639        __struct.x = buf.get_f32_le();
17640        __struct.y = buf.get_f32_le();
17641        __struct.z = buf.get_f32_le();
17642        __struct.vx = buf.get_f32_le();
17643        __struct.vy = buf.get_f32_le();
17644        __struct.vz = buf.get_f32_le();
17645        Ok(__struct)
17646    }
17647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17648        let mut __tmp = BytesMut::new(bytes);
17649        #[allow(clippy::absurd_extreme_comparisons)]
17650        #[allow(unused_comparisons)]
17651        if __tmp.remaining() < Self::ENCODED_LEN {
17652            panic!(
17653                "buffer is too small (need {} bytes, but got {})",
17654                Self::ENCODED_LEN,
17655                __tmp.remaining(),
17656            )
17657        }
17658        __tmp.put_u32_le(self.time_boot_ms);
17659        __tmp.put_f32_le(self.x);
17660        __tmp.put_f32_le(self.y);
17661        __tmp.put_f32_le(self.z);
17662        __tmp.put_f32_le(self.vx);
17663        __tmp.put_f32_le(self.vy);
17664        __tmp.put_f32_le(self.vz);
17665        if matches!(version, MavlinkVersion::V2) {
17666            let len = __tmp.len();
17667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17668        } else {
17669            __tmp.len()
17670        }
17671    }
17672}
17673#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17674#[doc = ""]
17675#[doc = "ID: 64"]
17676#[derive(Debug, Clone, PartialEq)]
17677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17679#[cfg_attr(feature = "ts", derive(TS))]
17680#[cfg_attr(feature = "ts", ts(export))]
17681pub struct LOCAL_POSITION_NED_COV_DATA {
17682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17683    pub time_usec: u64,
17684    #[doc = "X Position"]
17685    pub x: f32,
17686    #[doc = "Y Position"]
17687    pub y: f32,
17688    #[doc = "Z Position"]
17689    pub z: f32,
17690    #[doc = "X Speed"]
17691    pub vx: f32,
17692    #[doc = "Y Speed"]
17693    pub vy: f32,
17694    #[doc = "Z Speed"]
17695    pub vz: f32,
17696    #[doc = "X Acceleration"]
17697    pub ax: f32,
17698    #[doc = "Y Acceleration"]
17699    pub ay: f32,
17700    #[doc = "Z Acceleration"]
17701    pub az: f32,
17702    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17703    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17704    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17705    pub covariance: [f32; 45],
17706    #[doc = "Class id of the estimator this estimate originated from."]
17707    pub estimator_type: MavEstimatorType,
17708}
17709impl LOCAL_POSITION_NED_COV_DATA {
17710    pub const ENCODED_LEN: usize = 225usize;
17711    pub const DEFAULT: Self = Self {
17712        time_usec: 0_u64,
17713        x: 0.0_f32,
17714        y: 0.0_f32,
17715        z: 0.0_f32,
17716        vx: 0.0_f32,
17717        vy: 0.0_f32,
17718        vz: 0.0_f32,
17719        ax: 0.0_f32,
17720        ay: 0.0_f32,
17721        az: 0.0_f32,
17722        covariance: [0.0_f32; 45usize],
17723        estimator_type: MavEstimatorType::DEFAULT,
17724    };
17725    #[cfg(feature = "arbitrary")]
17726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17727        use arbitrary::{Arbitrary, Unstructured};
17728        let mut buf = [0u8; 1024];
17729        rng.fill_bytes(&mut buf);
17730        let mut unstructured = Unstructured::new(&buf);
17731        Self::arbitrary(&mut unstructured).unwrap_or_default()
17732    }
17733}
17734impl Default for LOCAL_POSITION_NED_COV_DATA {
17735    fn default() -> Self {
17736        Self::DEFAULT.clone()
17737    }
17738}
17739impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17740    type Message = MavMessage;
17741    const ID: u32 = 64u32;
17742    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17743    const EXTRA_CRC: u8 = 191u8;
17744    const ENCODED_LEN: usize = 225usize;
17745    fn deser(
17746        _version: MavlinkVersion,
17747        __input: &[u8],
17748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17749        let avail_len = __input.len();
17750        let mut payload_buf = [0; Self::ENCODED_LEN];
17751        let mut buf = if avail_len < Self::ENCODED_LEN {
17752            payload_buf[0..avail_len].copy_from_slice(__input);
17753            Bytes::new(&payload_buf)
17754        } else {
17755            Bytes::new(__input)
17756        };
17757        let mut __struct = Self::default();
17758        __struct.time_usec = buf.get_u64_le();
17759        __struct.x = buf.get_f32_le();
17760        __struct.y = buf.get_f32_le();
17761        __struct.z = buf.get_f32_le();
17762        __struct.vx = buf.get_f32_le();
17763        __struct.vy = buf.get_f32_le();
17764        __struct.vz = buf.get_f32_le();
17765        __struct.ax = buf.get_f32_le();
17766        __struct.ay = buf.get_f32_le();
17767        __struct.az = buf.get_f32_le();
17768        for v in &mut __struct.covariance {
17769            let val = buf.get_f32_le();
17770            *v = val;
17771        }
17772        let tmp = buf.get_u8();
17773        __struct.estimator_type =
17774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17775                enum_type: "MavEstimatorType",
17776                value: tmp as u32,
17777            })?;
17778        Ok(__struct)
17779    }
17780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17781        let mut __tmp = BytesMut::new(bytes);
17782        #[allow(clippy::absurd_extreme_comparisons)]
17783        #[allow(unused_comparisons)]
17784        if __tmp.remaining() < Self::ENCODED_LEN {
17785            panic!(
17786                "buffer is too small (need {} bytes, but got {})",
17787                Self::ENCODED_LEN,
17788                __tmp.remaining(),
17789            )
17790        }
17791        __tmp.put_u64_le(self.time_usec);
17792        __tmp.put_f32_le(self.x);
17793        __tmp.put_f32_le(self.y);
17794        __tmp.put_f32_le(self.z);
17795        __tmp.put_f32_le(self.vx);
17796        __tmp.put_f32_le(self.vy);
17797        __tmp.put_f32_le(self.vz);
17798        __tmp.put_f32_le(self.ax);
17799        __tmp.put_f32_le(self.ay);
17800        __tmp.put_f32_le(self.az);
17801        for val in &self.covariance {
17802            __tmp.put_f32_le(*val);
17803        }
17804        __tmp.put_u8(self.estimator_type as u8);
17805        if matches!(version, MavlinkVersion::V2) {
17806            let len = __tmp.len();
17807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17808        } else {
17809            __tmp.len()
17810        }
17811    }
17812}
17813#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17814#[doc = ""]
17815#[doc = "ID: 89"]
17816#[derive(Debug, Clone, PartialEq)]
17817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17819#[cfg_attr(feature = "ts", derive(TS))]
17820#[cfg_attr(feature = "ts", ts(export))]
17821pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17822    #[doc = "Timestamp (time since system boot)."]
17823    pub time_boot_ms: u32,
17824    #[doc = "X Position"]
17825    pub x: f32,
17826    #[doc = "Y Position"]
17827    pub y: f32,
17828    #[doc = "Z Position"]
17829    pub z: f32,
17830    #[doc = "Roll"]
17831    pub roll: f32,
17832    #[doc = "Pitch"]
17833    pub pitch: f32,
17834    #[doc = "Yaw"]
17835    pub yaw: f32,
17836}
17837impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17838    pub const ENCODED_LEN: usize = 28usize;
17839    pub const DEFAULT: Self = Self {
17840        time_boot_ms: 0_u32,
17841        x: 0.0_f32,
17842        y: 0.0_f32,
17843        z: 0.0_f32,
17844        roll: 0.0_f32,
17845        pitch: 0.0_f32,
17846        yaw: 0.0_f32,
17847    };
17848    #[cfg(feature = "arbitrary")]
17849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17850        use arbitrary::{Arbitrary, Unstructured};
17851        let mut buf = [0u8; 1024];
17852        rng.fill_bytes(&mut buf);
17853        let mut unstructured = Unstructured::new(&buf);
17854        Self::arbitrary(&mut unstructured).unwrap_or_default()
17855    }
17856}
17857impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17858    fn default() -> Self {
17859        Self::DEFAULT.clone()
17860    }
17861}
17862impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17863    type Message = MavMessage;
17864    const ID: u32 = 89u32;
17865    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17866    const EXTRA_CRC: u8 = 231u8;
17867    const ENCODED_LEN: usize = 28usize;
17868    fn deser(
17869        _version: MavlinkVersion,
17870        __input: &[u8],
17871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17872        let avail_len = __input.len();
17873        let mut payload_buf = [0; Self::ENCODED_LEN];
17874        let mut buf = if avail_len < Self::ENCODED_LEN {
17875            payload_buf[0..avail_len].copy_from_slice(__input);
17876            Bytes::new(&payload_buf)
17877        } else {
17878            Bytes::new(__input)
17879        };
17880        let mut __struct = Self::default();
17881        __struct.time_boot_ms = buf.get_u32_le();
17882        __struct.x = buf.get_f32_le();
17883        __struct.y = buf.get_f32_le();
17884        __struct.z = buf.get_f32_le();
17885        __struct.roll = buf.get_f32_le();
17886        __struct.pitch = buf.get_f32_le();
17887        __struct.yaw = buf.get_f32_le();
17888        Ok(__struct)
17889    }
17890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17891        let mut __tmp = BytesMut::new(bytes);
17892        #[allow(clippy::absurd_extreme_comparisons)]
17893        #[allow(unused_comparisons)]
17894        if __tmp.remaining() < Self::ENCODED_LEN {
17895            panic!(
17896                "buffer is too small (need {} bytes, but got {})",
17897                Self::ENCODED_LEN,
17898                __tmp.remaining(),
17899            )
17900        }
17901        __tmp.put_u32_le(self.time_boot_ms);
17902        __tmp.put_f32_le(self.x);
17903        __tmp.put_f32_le(self.y);
17904        __tmp.put_f32_le(self.z);
17905        __tmp.put_f32_le(self.roll);
17906        __tmp.put_f32_le(self.pitch);
17907        __tmp.put_f32_le(self.yaw);
17908        if matches!(version, MavlinkVersion::V2) {
17909            let len = __tmp.len();
17910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17911        } else {
17912            __tmp.len()
17913        }
17914    }
17915}
17916#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17917#[doc = ""]
17918#[doc = "ID: 268"]
17919#[derive(Debug, Clone, PartialEq)]
17920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17922#[cfg_attr(feature = "ts", derive(TS))]
17923#[cfg_attr(feature = "ts", ts(export))]
17924pub struct LOGGING_ACK_DATA {
17925    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17926    pub sequence: u16,
17927    #[doc = "system ID of the target"]
17928    pub target_system: u8,
17929    #[doc = "component ID of the target"]
17930    pub target_component: u8,
17931}
17932impl LOGGING_ACK_DATA {
17933    pub const ENCODED_LEN: usize = 4usize;
17934    pub const DEFAULT: Self = Self {
17935        sequence: 0_u16,
17936        target_system: 0_u8,
17937        target_component: 0_u8,
17938    };
17939    #[cfg(feature = "arbitrary")]
17940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17941        use arbitrary::{Arbitrary, Unstructured};
17942        let mut buf = [0u8; 1024];
17943        rng.fill_bytes(&mut buf);
17944        let mut unstructured = Unstructured::new(&buf);
17945        Self::arbitrary(&mut unstructured).unwrap_or_default()
17946    }
17947}
17948impl Default for LOGGING_ACK_DATA {
17949    fn default() -> Self {
17950        Self::DEFAULT.clone()
17951    }
17952}
17953impl MessageData for LOGGING_ACK_DATA {
17954    type Message = MavMessage;
17955    const ID: u32 = 268u32;
17956    const NAME: &'static str = "LOGGING_ACK";
17957    const EXTRA_CRC: u8 = 14u8;
17958    const ENCODED_LEN: usize = 4usize;
17959    fn deser(
17960        _version: MavlinkVersion,
17961        __input: &[u8],
17962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17963        let avail_len = __input.len();
17964        let mut payload_buf = [0; Self::ENCODED_LEN];
17965        let mut buf = if avail_len < Self::ENCODED_LEN {
17966            payload_buf[0..avail_len].copy_from_slice(__input);
17967            Bytes::new(&payload_buf)
17968        } else {
17969            Bytes::new(__input)
17970        };
17971        let mut __struct = Self::default();
17972        __struct.sequence = buf.get_u16_le();
17973        __struct.target_system = buf.get_u8();
17974        __struct.target_component = buf.get_u8();
17975        Ok(__struct)
17976    }
17977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17978        let mut __tmp = BytesMut::new(bytes);
17979        #[allow(clippy::absurd_extreme_comparisons)]
17980        #[allow(unused_comparisons)]
17981        if __tmp.remaining() < Self::ENCODED_LEN {
17982            panic!(
17983                "buffer is too small (need {} bytes, but got {})",
17984                Self::ENCODED_LEN,
17985                __tmp.remaining(),
17986            )
17987        }
17988        __tmp.put_u16_le(self.sequence);
17989        __tmp.put_u8(self.target_system);
17990        __tmp.put_u8(self.target_component);
17991        if matches!(version, MavlinkVersion::V2) {
17992            let len = __tmp.len();
17993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17994        } else {
17995            __tmp.len()
17996        }
17997    }
17998}
17999#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18000#[doc = ""]
18001#[doc = "ID: 266"]
18002#[derive(Debug, Clone, PartialEq)]
18003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18005#[cfg_attr(feature = "ts", derive(TS))]
18006#[cfg_attr(feature = "ts", ts(export))]
18007pub struct LOGGING_DATA_DATA {
18008    #[doc = "sequence number (can wrap)"]
18009    pub sequence: u16,
18010    #[doc = "system ID of the target"]
18011    pub target_system: u8,
18012    #[doc = "component ID of the target"]
18013    pub target_component: u8,
18014    #[doc = "data length"]
18015    pub length: u8,
18016    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18017    pub first_message_offset: u8,
18018    #[doc = "logged data"]
18019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18020    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18021    pub data: [u8; 249],
18022}
18023impl LOGGING_DATA_DATA {
18024    pub const ENCODED_LEN: usize = 255usize;
18025    pub const DEFAULT: Self = Self {
18026        sequence: 0_u16,
18027        target_system: 0_u8,
18028        target_component: 0_u8,
18029        length: 0_u8,
18030        first_message_offset: 0_u8,
18031        data: [0_u8; 249usize],
18032    };
18033    #[cfg(feature = "arbitrary")]
18034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18035        use arbitrary::{Arbitrary, Unstructured};
18036        let mut buf = [0u8; 1024];
18037        rng.fill_bytes(&mut buf);
18038        let mut unstructured = Unstructured::new(&buf);
18039        Self::arbitrary(&mut unstructured).unwrap_or_default()
18040    }
18041}
18042impl Default for LOGGING_DATA_DATA {
18043    fn default() -> Self {
18044        Self::DEFAULT.clone()
18045    }
18046}
18047impl MessageData for LOGGING_DATA_DATA {
18048    type Message = MavMessage;
18049    const ID: u32 = 266u32;
18050    const NAME: &'static str = "LOGGING_DATA";
18051    const EXTRA_CRC: u8 = 193u8;
18052    const ENCODED_LEN: usize = 255usize;
18053    fn deser(
18054        _version: MavlinkVersion,
18055        __input: &[u8],
18056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18057        let avail_len = __input.len();
18058        let mut payload_buf = [0; Self::ENCODED_LEN];
18059        let mut buf = if avail_len < Self::ENCODED_LEN {
18060            payload_buf[0..avail_len].copy_from_slice(__input);
18061            Bytes::new(&payload_buf)
18062        } else {
18063            Bytes::new(__input)
18064        };
18065        let mut __struct = Self::default();
18066        __struct.sequence = buf.get_u16_le();
18067        __struct.target_system = buf.get_u8();
18068        __struct.target_component = buf.get_u8();
18069        __struct.length = buf.get_u8();
18070        __struct.first_message_offset = buf.get_u8();
18071        for v in &mut __struct.data {
18072            let val = buf.get_u8();
18073            *v = val;
18074        }
18075        Ok(__struct)
18076    }
18077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18078        let mut __tmp = BytesMut::new(bytes);
18079        #[allow(clippy::absurd_extreme_comparisons)]
18080        #[allow(unused_comparisons)]
18081        if __tmp.remaining() < Self::ENCODED_LEN {
18082            panic!(
18083                "buffer is too small (need {} bytes, but got {})",
18084                Self::ENCODED_LEN,
18085                __tmp.remaining(),
18086            )
18087        }
18088        __tmp.put_u16_le(self.sequence);
18089        __tmp.put_u8(self.target_system);
18090        __tmp.put_u8(self.target_component);
18091        __tmp.put_u8(self.length);
18092        __tmp.put_u8(self.first_message_offset);
18093        for val in &self.data {
18094            __tmp.put_u8(*val);
18095        }
18096        if matches!(version, MavlinkVersion::V2) {
18097            let len = __tmp.len();
18098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18099        } else {
18100            __tmp.len()
18101        }
18102    }
18103}
18104#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18105#[doc = ""]
18106#[doc = "ID: 267"]
18107#[derive(Debug, Clone, PartialEq)]
18108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18110#[cfg_attr(feature = "ts", derive(TS))]
18111#[cfg_attr(feature = "ts", ts(export))]
18112pub struct LOGGING_DATA_ACKED_DATA {
18113    #[doc = "sequence number (can wrap)"]
18114    pub sequence: u16,
18115    #[doc = "system ID of the target"]
18116    pub target_system: u8,
18117    #[doc = "component ID of the target"]
18118    pub target_component: u8,
18119    #[doc = "data length"]
18120    pub length: u8,
18121    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18122    pub first_message_offset: u8,
18123    #[doc = "logged data"]
18124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18126    pub data: [u8; 249],
18127}
18128impl LOGGING_DATA_ACKED_DATA {
18129    pub const ENCODED_LEN: usize = 255usize;
18130    pub const DEFAULT: Self = Self {
18131        sequence: 0_u16,
18132        target_system: 0_u8,
18133        target_component: 0_u8,
18134        length: 0_u8,
18135        first_message_offset: 0_u8,
18136        data: [0_u8; 249usize],
18137    };
18138    #[cfg(feature = "arbitrary")]
18139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18140        use arbitrary::{Arbitrary, Unstructured};
18141        let mut buf = [0u8; 1024];
18142        rng.fill_bytes(&mut buf);
18143        let mut unstructured = Unstructured::new(&buf);
18144        Self::arbitrary(&mut unstructured).unwrap_or_default()
18145    }
18146}
18147impl Default for LOGGING_DATA_ACKED_DATA {
18148    fn default() -> Self {
18149        Self::DEFAULT.clone()
18150    }
18151}
18152impl MessageData for LOGGING_DATA_ACKED_DATA {
18153    type Message = MavMessage;
18154    const ID: u32 = 267u32;
18155    const NAME: &'static str = "LOGGING_DATA_ACKED";
18156    const EXTRA_CRC: u8 = 35u8;
18157    const ENCODED_LEN: usize = 255usize;
18158    fn deser(
18159        _version: MavlinkVersion,
18160        __input: &[u8],
18161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18162        let avail_len = __input.len();
18163        let mut payload_buf = [0; Self::ENCODED_LEN];
18164        let mut buf = if avail_len < Self::ENCODED_LEN {
18165            payload_buf[0..avail_len].copy_from_slice(__input);
18166            Bytes::new(&payload_buf)
18167        } else {
18168            Bytes::new(__input)
18169        };
18170        let mut __struct = Self::default();
18171        __struct.sequence = buf.get_u16_le();
18172        __struct.target_system = buf.get_u8();
18173        __struct.target_component = buf.get_u8();
18174        __struct.length = buf.get_u8();
18175        __struct.first_message_offset = buf.get_u8();
18176        for v in &mut __struct.data {
18177            let val = buf.get_u8();
18178            *v = val;
18179        }
18180        Ok(__struct)
18181    }
18182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18183        let mut __tmp = BytesMut::new(bytes);
18184        #[allow(clippy::absurd_extreme_comparisons)]
18185        #[allow(unused_comparisons)]
18186        if __tmp.remaining() < Self::ENCODED_LEN {
18187            panic!(
18188                "buffer is too small (need {} bytes, but got {})",
18189                Self::ENCODED_LEN,
18190                __tmp.remaining(),
18191            )
18192        }
18193        __tmp.put_u16_le(self.sequence);
18194        __tmp.put_u8(self.target_system);
18195        __tmp.put_u8(self.target_component);
18196        __tmp.put_u8(self.length);
18197        __tmp.put_u8(self.first_message_offset);
18198        for val in &self.data {
18199            __tmp.put_u8(*val);
18200        }
18201        if matches!(version, MavlinkVersion::V2) {
18202            let len = __tmp.len();
18203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18204        } else {
18205            __tmp.len()
18206        }
18207    }
18208}
18209#[doc = "Reply to LOG_REQUEST_DATA."]
18210#[doc = ""]
18211#[doc = "ID: 120"]
18212#[derive(Debug, Clone, PartialEq)]
18213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18215#[cfg_attr(feature = "ts", derive(TS))]
18216#[cfg_attr(feature = "ts", ts(export))]
18217pub struct LOG_DATA_DATA {
18218    #[doc = "Offset into the log"]
18219    pub ofs: u32,
18220    #[doc = "Log id (from LOG_ENTRY reply)"]
18221    pub id: u16,
18222    #[doc = "Number of bytes (zero for end of log)"]
18223    pub count: u8,
18224    #[doc = "log data"]
18225    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18226    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18227    pub data: [u8; 90],
18228}
18229impl LOG_DATA_DATA {
18230    pub const ENCODED_LEN: usize = 97usize;
18231    pub const DEFAULT: Self = Self {
18232        ofs: 0_u32,
18233        id: 0_u16,
18234        count: 0_u8,
18235        data: [0_u8; 90usize],
18236    };
18237    #[cfg(feature = "arbitrary")]
18238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18239        use arbitrary::{Arbitrary, Unstructured};
18240        let mut buf = [0u8; 1024];
18241        rng.fill_bytes(&mut buf);
18242        let mut unstructured = Unstructured::new(&buf);
18243        Self::arbitrary(&mut unstructured).unwrap_or_default()
18244    }
18245}
18246impl Default for LOG_DATA_DATA {
18247    fn default() -> Self {
18248        Self::DEFAULT.clone()
18249    }
18250}
18251impl MessageData for LOG_DATA_DATA {
18252    type Message = MavMessage;
18253    const ID: u32 = 120u32;
18254    const NAME: &'static str = "LOG_DATA";
18255    const EXTRA_CRC: u8 = 134u8;
18256    const ENCODED_LEN: usize = 97usize;
18257    fn deser(
18258        _version: MavlinkVersion,
18259        __input: &[u8],
18260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18261        let avail_len = __input.len();
18262        let mut payload_buf = [0; Self::ENCODED_LEN];
18263        let mut buf = if avail_len < Self::ENCODED_LEN {
18264            payload_buf[0..avail_len].copy_from_slice(__input);
18265            Bytes::new(&payload_buf)
18266        } else {
18267            Bytes::new(__input)
18268        };
18269        let mut __struct = Self::default();
18270        __struct.ofs = buf.get_u32_le();
18271        __struct.id = buf.get_u16_le();
18272        __struct.count = buf.get_u8();
18273        for v in &mut __struct.data {
18274            let val = buf.get_u8();
18275            *v = val;
18276        }
18277        Ok(__struct)
18278    }
18279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18280        let mut __tmp = BytesMut::new(bytes);
18281        #[allow(clippy::absurd_extreme_comparisons)]
18282        #[allow(unused_comparisons)]
18283        if __tmp.remaining() < Self::ENCODED_LEN {
18284            panic!(
18285                "buffer is too small (need {} bytes, but got {})",
18286                Self::ENCODED_LEN,
18287                __tmp.remaining(),
18288            )
18289        }
18290        __tmp.put_u32_le(self.ofs);
18291        __tmp.put_u16_le(self.id);
18292        __tmp.put_u8(self.count);
18293        for val in &self.data {
18294            __tmp.put_u8(*val);
18295        }
18296        if matches!(version, MavlinkVersion::V2) {
18297            let len = __tmp.len();
18298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18299        } else {
18300            __tmp.len()
18301        }
18302    }
18303}
18304#[doc = "Reply to LOG_REQUEST_LIST."]
18305#[doc = ""]
18306#[doc = "ID: 118"]
18307#[derive(Debug, Clone, PartialEq)]
18308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18310#[cfg_attr(feature = "ts", derive(TS))]
18311#[cfg_attr(feature = "ts", ts(export))]
18312pub struct LOG_ENTRY_DATA {
18313    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18314    pub time_utc: u32,
18315    #[doc = "Size of the log (may be approximate)"]
18316    pub size: u32,
18317    #[doc = "Log id"]
18318    pub id: u16,
18319    #[doc = "Total number of logs"]
18320    pub num_logs: u16,
18321    #[doc = "High log number"]
18322    pub last_log_num: u16,
18323}
18324impl LOG_ENTRY_DATA {
18325    pub const ENCODED_LEN: usize = 14usize;
18326    pub const DEFAULT: Self = Self {
18327        time_utc: 0_u32,
18328        size: 0_u32,
18329        id: 0_u16,
18330        num_logs: 0_u16,
18331        last_log_num: 0_u16,
18332    };
18333    #[cfg(feature = "arbitrary")]
18334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18335        use arbitrary::{Arbitrary, Unstructured};
18336        let mut buf = [0u8; 1024];
18337        rng.fill_bytes(&mut buf);
18338        let mut unstructured = Unstructured::new(&buf);
18339        Self::arbitrary(&mut unstructured).unwrap_or_default()
18340    }
18341}
18342impl Default for LOG_ENTRY_DATA {
18343    fn default() -> Self {
18344        Self::DEFAULT.clone()
18345    }
18346}
18347impl MessageData for LOG_ENTRY_DATA {
18348    type Message = MavMessage;
18349    const ID: u32 = 118u32;
18350    const NAME: &'static str = "LOG_ENTRY";
18351    const EXTRA_CRC: u8 = 56u8;
18352    const ENCODED_LEN: usize = 14usize;
18353    fn deser(
18354        _version: MavlinkVersion,
18355        __input: &[u8],
18356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18357        let avail_len = __input.len();
18358        let mut payload_buf = [0; Self::ENCODED_LEN];
18359        let mut buf = if avail_len < Self::ENCODED_LEN {
18360            payload_buf[0..avail_len].copy_from_slice(__input);
18361            Bytes::new(&payload_buf)
18362        } else {
18363            Bytes::new(__input)
18364        };
18365        let mut __struct = Self::default();
18366        __struct.time_utc = buf.get_u32_le();
18367        __struct.size = buf.get_u32_le();
18368        __struct.id = buf.get_u16_le();
18369        __struct.num_logs = buf.get_u16_le();
18370        __struct.last_log_num = buf.get_u16_le();
18371        Ok(__struct)
18372    }
18373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18374        let mut __tmp = BytesMut::new(bytes);
18375        #[allow(clippy::absurd_extreme_comparisons)]
18376        #[allow(unused_comparisons)]
18377        if __tmp.remaining() < Self::ENCODED_LEN {
18378            panic!(
18379                "buffer is too small (need {} bytes, but got {})",
18380                Self::ENCODED_LEN,
18381                __tmp.remaining(),
18382            )
18383        }
18384        __tmp.put_u32_le(self.time_utc);
18385        __tmp.put_u32_le(self.size);
18386        __tmp.put_u16_le(self.id);
18387        __tmp.put_u16_le(self.num_logs);
18388        __tmp.put_u16_le(self.last_log_num);
18389        if matches!(version, MavlinkVersion::V2) {
18390            let len = __tmp.len();
18391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18392        } else {
18393            __tmp.len()
18394        }
18395    }
18396}
18397#[doc = "Erase all logs."]
18398#[doc = ""]
18399#[doc = "ID: 121"]
18400#[derive(Debug, Clone, PartialEq)]
18401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18403#[cfg_attr(feature = "ts", derive(TS))]
18404#[cfg_attr(feature = "ts", ts(export))]
18405pub struct LOG_ERASE_DATA {
18406    #[doc = "System ID"]
18407    pub target_system: u8,
18408    #[doc = "Component ID"]
18409    pub target_component: u8,
18410}
18411impl LOG_ERASE_DATA {
18412    pub const ENCODED_LEN: usize = 2usize;
18413    pub const DEFAULT: Self = Self {
18414        target_system: 0_u8,
18415        target_component: 0_u8,
18416    };
18417    #[cfg(feature = "arbitrary")]
18418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18419        use arbitrary::{Arbitrary, Unstructured};
18420        let mut buf = [0u8; 1024];
18421        rng.fill_bytes(&mut buf);
18422        let mut unstructured = Unstructured::new(&buf);
18423        Self::arbitrary(&mut unstructured).unwrap_or_default()
18424    }
18425}
18426impl Default for LOG_ERASE_DATA {
18427    fn default() -> Self {
18428        Self::DEFAULT.clone()
18429    }
18430}
18431impl MessageData for LOG_ERASE_DATA {
18432    type Message = MavMessage;
18433    const ID: u32 = 121u32;
18434    const NAME: &'static str = "LOG_ERASE";
18435    const EXTRA_CRC: u8 = 237u8;
18436    const ENCODED_LEN: usize = 2usize;
18437    fn deser(
18438        _version: MavlinkVersion,
18439        __input: &[u8],
18440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18441        let avail_len = __input.len();
18442        let mut payload_buf = [0; Self::ENCODED_LEN];
18443        let mut buf = if avail_len < Self::ENCODED_LEN {
18444            payload_buf[0..avail_len].copy_from_slice(__input);
18445            Bytes::new(&payload_buf)
18446        } else {
18447            Bytes::new(__input)
18448        };
18449        let mut __struct = Self::default();
18450        __struct.target_system = buf.get_u8();
18451        __struct.target_component = buf.get_u8();
18452        Ok(__struct)
18453    }
18454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18455        let mut __tmp = BytesMut::new(bytes);
18456        #[allow(clippy::absurd_extreme_comparisons)]
18457        #[allow(unused_comparisons)]
18458        if __tmp.remaining() < Self::ENCODED_LEN {
18459            panic!(
18460                "buffer is too small (need {} bytes, but got {})",
18461                Self::ENCODED_LEN,
18462                __tmp.remaining(),
18463            )
18464        }
18465        __tmp.put_u8(self.target_system);
18466        __tmp.put_u8(self.target_component);
18467        if matches!(version, MavlinkVersion::V2) {
18468            let len = __tmp.len();
18469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18470        } else {
18471            __tmp.len()
18472        }
18473    }
18474}
18475#[doc = "Request a chunk of a log."]
18476#[doc = ""]
18477#[doc = "ID: 119"]
18478#[derive(Debug, Clone, PartialEq)]
18479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18481#[cfg_attr(feature = "ts", derive(TS))]
18482#[cfg_attr(feature = "ts", ts(export))]
18483pub struct LOG_REQUEST_DATA_DATA {
18484    #[doc = "Offset into the log"]
18485    pub ofs: u32,
18486    #[doc = "Number of bytes"]
18487    pub count: u32,
18488    #[doc = "Log id (from LOG_ENTRY reply)"]
18489    pub id: u16,
18490    #[doc = "System ID"]
18491    pub target_system: u8,
18492    #[doc = "Component ID"]
18493    pub target_component: u8,
18494}
18495impl LOG_REQUEST_DATA_DATA {
18496    pub const ENCODED_LEN: usize = 12usize;
18497    pub const DEFAULT: Self = Self {
18498        ofs: 0_u32,
18499        count: 0_u32,
18500        id: 0_u16,
18501        target_system: 0_u8,
18502        target_component: 0_u8,
18503    };
18504    #[cfg(feature = "arbitrary")]
18505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18506        use arbitrary::{Arbitrary, Unstructured};
18507        let mut buf = [0u8; 1024];
18508        rng.fill_bytes(&mut buf);
18509        let mut unstructured = Unstructured::new(&buf);
18510        Self::arbitrary(&mut unstructured).unwrap_or_default()
18511    }
18512}
18513impl Default for LOG_REQUEST_DATA_DATA {
18514    fn default() -> Self {
18515        Self::DEFAULT.clone()
18516    }
18517}
18518impl MessageData for LOG_REQUEST_DATA_DATA {
18519    type Message = MavMessage;
18520    const ID: u32 = 119u32;
18521    const NAME: &'static str = "LOG_REQUEST_DATA";
18522    const EXTRA_CRC: u8 = 116u8;
18523    const ENCODED_LEN: usize = 12usize;
18524    fn deser(
18525        _version: MavlinkVersion,
18526        __input: &[u8],
18527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18528        let avail_len = __input.len();
18529        let mut payload_buf = [0; Self::ENCODED_LEN];
18530        let mut buf = if avail_len < Self::ENCODED_LEN {
18531            payload_buf[0..avail_len].copy_from_slice(__input);
18532            Bytes::new(&payload_buf)
18533        } else {
18534            Bytes::new(__input)
18535        };
18536        let mut __struct = Self::default();
18537        __struct.ofs = buf.get_u32_le();
18538        __struct.count = buf.get_u32_le();
18539        __struct.id = buf.get_u16_le();
18540        __struct.target_system = buf.get_u8();
18541        __struct.target_component = buf.get_u8();
18542        Ok(__struct)
18543    }
18544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18545        let mut __tmp = BytesMut::new(bytes);
18546        #[allow(clippy::absurd_extreme_comparisons)]
18547        #[allow(unused_comparisons)]
18548        if __tmp.remaining() < Self::ENCODED_LEN {
18549            panic!(
18550                "buffer is too small (need {} bytes, but got {})",
18551                Self::ENCODED_LEN,
18552                __tmp.remaining(),
18553            )
18554        }
18555        __tmp.put_u32_le(self.ofs);
18556        __tmp.put_u32_le(self.count);
18557        __tmp.put_u16_le(self.id);
18558        __tmp.put_u8(self.target_system);
18559        __tmp.put_u8(self.target_component);
18560        if matches!(version, MavlinkVersion::V2) {
18561            let len = __tmp.len();
18562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18563        } else {
18564            __tmp.len()
18565        }
18566    }
18567}
18568#[doc = "Stop log transfer and resume normal logging."]
18569#[doc = ""]
18570#[doc = "ID: 122"]
18571#[derive(Debug, Clone, PartialEq)]
18572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18574#[cfg_attr(feature = "ts", derive(TS))]
18575#[cfg_attr(feature = "ts", ts(export))]
18576pub struct LOG_REQUEST_END_DATA {
18577    #[doc = "System ID"]
18578    pub target_system: u8,
18579    #[doc = "Component ID"]
18580    pub target_component: u8,
18581}
18582impl LOG_REQUEST_END_DATA {
18583    pub const ENCODED_LEN: usize = 2usize;
18584    pub const DEFAULT: Self = Self {
18585        target_system: 0_u8,
18586        target_component: 0_u8,
18587    };
18588    #[cfg(feature = "arbitrary")]
18589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18590        use arbitrary::{Arbitrary, Unstructured};
18591        let mut buf = [0u8; 1024];
18592        rng.fill_bytes(&mut buf);
18593        let mut unstructured = Unstructured::new(&buf);
18594        Self::arbitrary(&mut unstructured).unwrap_or_default()
18595    }
18596}
18597impl Default for LOG_REQUEST_END_DATA {
18598    fn default() -> Self {
18599        Self::DEFAULT.clone()
18600    }
18601}
18602impl MessageData for LOG_REQUEST_END_DATA {
18603    type Message = MavMessage;
18604    const ID: u32 = 122u32;
18605    const NAME: &'static str = "LOG_REQUEST_END";
18606    const EXTRA_CRC: u8 = 203u8;
18607    const ENCODED_LEN: usize = 2usize;
18608    fn deser(
18609        _version: MavlinkVersion,
18610        __input: &[u8],
18611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18612        let avail_len = __input.len();
18613        let mut payload_buf = [0; Self::ENCODED_LEN];
18614        let mut buf = if avail_len < Self::ENCODED_LEN {
18615            payload_buf[0..avail_len].copy_from_slice(__input);
18616            Bytes::new(&payload_buf)
18617        } else {
18618            Bytes::new(__input)
18619        };
18620        let mut __struct = Self::default();
18621        __struct.target_system = buf.get_u8();
18622        __struct.target_component = buf.get_u8();
18623        Ok(__struct)
18624    }
18625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18626        let mut __tmp = BytesMut::new(bytes);
18627        #[allow(clippy::absurd_extreme_comparisons)]
18628        #[allow(unused_comparisons)]
18629        if __tmp.remaining() < Self::ENCODED_LEN {
18630            panic!(
18631                "buffer is too small (need {} bytes, but got {})",
18632                Self::ENCODED_LEN,
18633                __tmp.remaining(),
18634            )
18635        }
18636        __tmp.put_u8(self.target_system);
18637        __tmp.put_u8(self.target_component);
18638        if matches!(version, MavlinkVersion::V2) {
18639            let len = __tmp.len();
18640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18641        } else {
18642            __tmp.len()
18643        }
18644    }
18645}
18646#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18647#[doc = ""]
18648#[doc = "ID: 117"]
18649#[derive(Debug, Clone, PartialEq)]
18650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18652#[cfg_attr(feature = "ts", derive(TS))]
18653#[cfg_attr(feature = "ts", ts(export))]
18654pub struct LOG_REQUEST_LIST_DATA {
18655    #[doc = "First log id (0 for first available)"]
18656    pub start: u16,
18657    #[doc = "Last log id (0xffff for last available)"]
18658    pub end: u16,
18659    #[doc = "System ID"]
18660    pub target_system: u8,
18661    #[doc = "Component ID"]
18662    pub target_component: u8,
18663}
18664impl LOG_REQUEST_LIST_DATA {
18665    pub const ENCODED_LEN: usize = 6usize;
18666    pub const DEFAULT: Self = Self {
18667        start: 0_u16,
18668        end: 0_u16,
18669        target_system: 0_u8,
18670        target_component: 0_u8,
18671    };
18672    #[cfg(feature = "arbitrary")]
18673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18674        use arbitrary::{Arbitrary, Unstructured};
18675        let mut buf = [0u8; 1024];
18676        rng.fill_bytes(&mut buf);
18677        let mut unstructured = Unstructured::new(&buf);
18678        Self::arbitrary(&mut unstructured).unwrap_or_default()
18679    }
18680}
18681impl Default for LOG_REQUEST_LIST_DATA {
18682    fn default() -> Self {
18683        Self::DEFAULT.clone()
18684    }
18685}
18686impl MessageData for LOG_REQUEST_LIST_DATA {
18687    type Message = MavMessage;
18688    const ID: u32 = 117u32;
18689    const NAME: &'static str = "LOG_REQUEST_LIST";
18690    const EXTRA_CRC: u8 = 128u8;
18691    const ENCODED_LEN: usize = 6usize;
18692    fn deser(
18693        _version: MavlinkVersion,
18694        __input: &[u8],
18695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18696        let avail_len = __input.len();
18697        let mut payload_buf = [0; Self::ENCODED_LEN];
18698        let mut buf = if avail_len < Self::ENCODED_LEN {
18699            payload_buf[0..avail_len].copy_from_slice(__input);
18700            Bytes::new(&payload_buf)
18701        } else {
18702            Bytes::new(__input)
18703        };
18704        let mut __struct = Self::default();
18705        __struct.start = buf.get_u16_le();
18706        __struct.end = buf.get_u16_le();
18707        __struct.target_system = buf.get_u8();
18708        __struct.target_component = buf.get_u8();
18709        Ok(__struct)
18710    }
18711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18712        let mut __tmp = BytesMut::new(bytes);
18713        #[allow(clippy::absurd_extreme_comparisons)]
18714        #[allow(unused_comparisons)]
18715        if __tmp.remaining() < Self::ENCODED_LEN {
18716            panic!(
18717                "buffer is too small (need {} bytes, but got {})",
18718                Self::ENCODED_LEN,
18719                __tmp.remaining(),
18720            )
18721        }
18722        __tmp.put_u16_le(self.start);
18723        __tmp.put_u16_le(self.end);
18724        __tmp.put_u8(self.target_system);
18725        __tmp.put_u8(self.target_component);
18726        if matches!(version, MavlinkVersion::V2) {
18727            let len = __tmp.len();
18728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18729        } else {
18730            __tmp.len()
18731        }
18732    }
18733}
18734#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18735#[doc = ""]
18736#[doc = "ID: 192"]
18737#[derive(Debug, Clone, PartialEq)]
18738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18740#[cfg_attr(feature = "ts", derive(TS))]
18741#[cfg_attr(feature = "ts", ts(export))]
18742pub struct MAG_CAL_REPORT_DATA {
18743    #[doc = "RMS milligauss residuals."]
18744    pub fitness: f32,
18745    #[doc = "X offset."]
18746    pub ofs_x: f32,
18747    #[doc = "Y offset."]
18748    pub ofs_y: f32,
18749    #[doc = "Z offset."]
18750    pub ofs_z: f32,
18751    #[doc = "X diagonal (matrix 11)."]
18752    pub diag_x: f32,
18753    #[doc = "Y diagonal (matrix 22)."]
18754    pub diag_y: f32,
18755    #[doc = "Z diagonal (matrix 33)."]
18756    pub diag_z: f32,
18757    #[doc = "X off-diagonal (matrix 12 and 21)."]
18758    pub offdiag_x: f32,
18759    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18760    pub offdiag_y: f32,
18761    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18762    pub offdiag_z: f32,
18763    #[doc = "Compass being calibrated."]
18764    pub compass_id: u8,
18765    #[doc = "Bitmask of compasses being calibrated."]
18766    pub cal_mask: u8,
18767    #[doc = "Calibration Status."]
18768    pub cal_status: MagCalStatus,
18769    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18770    pub autosaved: u8,
18771    #[doc = "Confidence in orientation (higher is better)."]
18772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18773    pub orientation_confidence: f32,
18774    #[doc = "orientation before calibration."]
18775    #[cfg_attr(feature = "serde", serde(default))]
18776    pub old_orientation: MavSensorOrientation,
18777    #[doc = "orientation after calibration."]
18778    #[cfg_attr(feature = "serde", serde(default))]
18779    pub new_orientation: MavSensorOrientation,
18780    #[doc = "field radius correction factor"]
18781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18782    pub scale_factor: f32,
18783}
18784impl MAG_CAL_REPORT_DATA {
18785    pub const ENCODED_LEN: usize = 54usize;
18786    pub const DEFAULT: Self = Self {
18787        fitness: 0.0_f32,
18788        ofs_x: 0.0_f32,
18789        ofs_y: 0.0_f32,
18790        ofs_z: 0.0_f32,
18791        diag_x: 0.0_f32,
18792        diag_y: 0.0_f32,
18793        diag_z: 0.0_f32,
18794        offdiag_x: 0.0_f32,
18795        offdiag_y: 0.0_f32,
18796        offdiag_z: 0.0_f32,
18797        compass_id: 0_u8,
18798        cal_mask: 0_u8,
18799        cal_status: MagCalStatus::DEFAULT,
18800        autosaved: 0_u8,
18801        orientation_confidence: 0.0_f32,
18802        old_orientation: MavSensorOrientation::DEFAULT,
18803        new_orientation: MavSensorOrientation::DEFAULT,
18804        scale_factor: 0.0_f32,
18805    };
18806    #[cfg(feature = "arbitrary")]
18807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18808        use arbitrary::{Arbitrary, Unstructured};
18809        let mut buf = [0u8; 1024];
18810        rng.fill_bytes(&mut buf);
18811        let mut unstructured = Unstructured::new(&buf);
18812        Self::arbitrary(&mut unstructured).unwrap_or_default()
18813    }
18814}
18815impl Default for MAG_CAL_REPORT_DATA {
18816    fn default() -> Self {
18817        Self::DEFAULT.clone()
18818    }
18819}
18820impl MessageData for MAG_CAL_REPORT_DATA {
18821    type Message = MavMessage;
18822    const ID: u32 = 192u32;
18823    const NAME: &'static str = "MAG_CAL_REPORT";
18824    const EXTRA_CRC: u8 = 36u8;
18825    const ENCODED_LEN: usize = 54usize;
18826    fn deser(
18827        _version: MavlinkVersion,
18828        __input: &[u8],
18829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18830        let avail_len = __input.len();
18831        let mut payload_buf = [0; Self::ENCODED_LEN];
18832        let mut buf = if avail_len < Self::ENCODED_LEN {
18833            payload_buf[0..avail_len].copy_from_slice(__input);
18834            Bytes::new(&payload_buf)
18835        } else {
18836            Bytes::new(__input)
18837        };
18838        let mut __struct = Self::default();
18839        __struct.fitness = buf.get_f32_le();
18840        __struct.ofs_x = buf.get_f32_le();
18841        __struct.ofs_y = buf.get_f32_le();
18842        __struct.ofs_z = buf.get_f32_le();
18843        __struct.diag_x = buf.get_f32_le();
18844        __struct.diag_y = buf.get_f32_le();
18845        __struct.diag_z = buf.get_f32_le();
18846        __struct.offdiag_x = buf.get_f32_le();
18847        __struct.offdiag_y = buf.get_f32_le();
18848        __struct.offdiag_z = buf.get_f32_le();
18849        __struct.compass_id = buf.get_u8();
18850        __struct.cal_mask = buf.get_u8();
18851        let tmp = buf.get_u8();
18852        __struct.cal_status =
18853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18854                enum_type: "MagCalStatus",
18855                value: tmp as u32,
18856            })?;
18857        __struct.autosaved = buf.get_u8();
18858        __struct.orientation_confidence = buf.get_f32_le();
18859        let tmp = buf.get_u8();
18860        __struct.old_orientation =
18861            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18862                enum_type: "MavSensorOrientation",
18863                value: tmp as u32,
18864            })?;
18865        let tmp = buf.get_u8();
18866        __struct.new_orientation =
18867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18868                enum_type: "MavSensorOrientation",
18869                value: tmp as u32,
18870            })?;
18871        __struct.scale_factor = buf.get_f32_le();
18872        Ok(__struct)
18873    }
18874    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18875        let mut __tmp = BytesMut::new(bytes);
18876        #[allow(clippy::absurd_extreme_comparisons)]
18877        #[allow(unused_comparisons)]
18878        if __tmp.remaining() < Self::ENCODED_LEN {
18879            panic!(
18880                "buffer is too small (need {} bytes, but got {})",
18881                Self::ENCODED_LEN,
18882                __tmp.remaining(),
18883            )
18884        }
18885        __tmp.put_f32_le(self.fitness);
18886        __tmp.put_f32_le(self.ofs_x);
18887        __tmp.put_f32_le(self.ofs_y);
18888        __tmp.put_f32_le(self.ofs_z);
18889        __tmp.put_f32_le(self.diag_x);
18890        __tmp.put_f32_le(self.diag_y);
18891        __tmp.put_f32_le(self.diag_z);
18892        __tmp.put_f32_le(self.offdiag_x);
18893        __tmp.put_f32_le(self.offdiag_y);
18894        __tmp.put_f32_le(self.offdiag_z);
18895        __tmp.put_u8(self.compass_id);
18896        __tmp.put_u8(self.cal_mask);
18897        __tmp.put_u8(self.cal_status as u8);
18898        __tmp.put_u8(self.autosaved);
18899        if matches!(version, MavlinkVersion::V2) {
18900            __tmp.put_f32_le(self.orientation_confidence);
18901            __tmp.put_u8(self.old_orientation as u8);
18902            __tmp.put_u8(self.new_orientation as u8);
18903            __tmp.put_f32_le(self.scale_factor);
18904            let len = __tmp.len();
18905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18906        } else {
18907            __tmp.len()
18908        }
18909    }
18910}
18911#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18912#[doc = ""]
18913#[doc = "ID: 69"]
18914#[derive(Debug, Clone, PartialEq)]
18915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18917#[cfg_attr(feature = "ts", derive(TS))]
18918#[cfg_attr(feature = "ts", ts(export))]
18919pub struct MANUAL_CONTROL_DATA {
18920    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18921    pub x: i16,
18922    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18923    pub y: i16,
18924    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18925    pub z: i16,
18926    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18927    pub r: i16,
18928    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18929    pub buttons: u16,
18930    #[doc = "The system to be controlled."]
18931    pub target: u8,
18932    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18934    pub buttons2: u16,
18935    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18937    pub enabled_extensions: u8,
18938    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18940    pub s: i16,
18941    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18942    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18943    pub t: i16,
18944    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18945    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18946    pub aux1: i16,
18947    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18949    pub aux2: i16,
18950    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18952    pub aux3: i16,
18953    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18955    pub aux4: i16,
18956    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18957    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18958    pub aux5: i16,
18959    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18961    pub aux6: i16,
18962}
18963impl MANUAL_CONTROL_DATA {
18964    pub const ENCODED_LEN: usize = 30usize;
18965    pub const DEFAULT: Self = Self {
18966        x: 0_i16,
18967        y: 0_i16,
18968        z: 0_i16,
18969        r: 0_i16,
18970        buttons: 0_u16,
18971        target: 0_u8,
18972        buttons2: 0_u16,
18973        enabled_extensions: 0_u8,
18974        s: 0_i16,
18975        t: 0_i16,
18976        aux1: 0_i16,
18977        aux2: 0_i16,
18978        aux3: 0_i16,
18979        aux4: 0_i16,
18980        aux5: 0_i16,
18981        aux6: 0_i16,
18982    };
18983    #[cfg(feature = "arbitrary")]
18984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18985        use arbitrary::{Arbitrary, Unstructured};
18986        let mut buf = [0u8; 1024];
18987        rng.fill_bytes(&mut buf);
18988        let mut unstructured = Unstructured::new(&buf);
18989        Self::arbitrary(&mut unstructured).unwrap_or_default()
18990    }
18991}
18992impl Default for MANUAL_CONTROL_DATA {
18993    fn default() -> Self {
18994        Self::DEFAULT.clone()
18995    }
18996}
18997impl MessageData for MANUAL_CONTROL_DATA {
18998    type Message = MavMessage;
18999    const ID: u32 = 69u32;
19000    const NAME: &'static str = "MANUAL_CONTROL";
19001    const EXTRA_CRC: u8 = 243u8;
19002    const ENCODED_LEN: usize = 30usize;
19003    fn deser(
19004        _version: MavlinkVersion,
19005        __input: &[u8],
19006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19007        let avail_len = __input.len();
19008        let mut payload_buf = [0; Self::ENCODED_LEN];
19009        let mut buf = if avail_len < Self::ENCODED_LEN {
19010            payload_buf[0..avail_len].copy_from_slice(__input);
19011            Bytes::new(&payload_buf)
19012        } else {
19013            Bytes::new(__input)
19014        };
19015        let mut __struct = Self::default();
19016        __struct.x = buf.get_i16_le();
19017        __struct.y = buf.get_i16_le();
19018        __struct.z = buf.get_i16_le();
19019        __struct.r = buf.get_i16_le();
19020        __struct.buttons = buf.get_u16_le();
19021        __struct.target = buf.get_u8();
19022        __struct.buttons2 = buf.get_u16_le();
19023        __struct.enabled_extensions = buf.get_u8();
19024        __struct.s = buf.get_i16_le();
19025        __struct.t = buf.get_i16_le();
19026        __struct.aux1 = buf.get_i16_le();
19027        __struct.aux2 = buf.get_i16_le();
19028        __struct.aux3 = buf.get_i16_le();
19029        __struct.aux4 = buf.get_i16_le();
19030        __struct.aux5 = buf.get_i16_le();
19031        __struct.aux6 = buf.get_i16_le();
19032        Ok(__struct)
19033    }
19034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19035        let mut __tmp = BytesMut::new(bytes);
19036        #[allow(clippy::absurd_extreme_comparisons)]
19037        #[allow(unused_comparisons)]
19038        if __tmp.remaining() < Self::ENCODED_LEN {
19039            panic!(
19040                "buffer is too small (need {} bytes, but got {})",
19041                Self::ENCODED_LEN,
19042                __tmp.remaining(),
19043            )
19044        }
19045        __tmp.put_i16_le(self.x);
19046        __tmp.put_i16_le(self.y);
19047        __tmp.put_i16_le(self.z);
19048        __tmp.put_i16_le(self.r);
19049        __tmp.put_u16_le(self.buttons);
19050        __tmp.put_u8(self.target);
19051        if matches!(version, MavlinkVersion::V2) {
19052            __tmp.put_u16_le(self.buttons2);
19053            __tmp.put_u8(self.enabled_extensions);
19054            __tmp.put_i16_le(self.s);
19055            __tmp.put_i16_le(self.t);
19056            __tmp.put_i16_le(self.aux1);
19057            __tmp.put_i16_le(self.aux2);
19058            __tmp.put_i16_le(self.aux3);
19059            __tmp.put_i16_le(self.aux4);
19060            __tmp.put_i16_le(self.aux5);
19061            __tmp.put_i16_le(self.aux6);
19062            let len = __tmp.len();
19063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19064        } else {
19065            __tmp.len()
19066        }
19067    }
19068}
19069#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19070#[doc = ""]
19071#[doc = "ID: 81"]
19072#[derive(Debug, Clone, PartialEq)]
19073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19075#[cfg_attr(feature = "ts", derive(TS))]
19076#[cfg_attr(feature = "ts", ts(export))]
19077pub struct MANUAL_SETPOINT_DATA {
19078    #[doc = "Timestamp (time since system boot)."]
19079    pub time_boot_ms: u32,
19080    #[doc = "Desired roll rate"]
19081    pub roll: f32,
19082    #[doc = "Desired pitch rate"]
19083    pub pitch: f32,
19084    #[doc = "Desired yaw rate"]
19085    pub yaw: f32,
19086    #[doc = "Collective thrust, normalized to 0 .. 1"]
19087    pub thrust: f32,
19088    #[doc = "Flight mode switch position, 0.. 255"]
19089    pub mode_switch: u8,
19090    #[doc = "Override mode switch position, 0.. 255"]
19091    pub manual_override_switch: u8,
19092}
19093impl MANUAL_SETPOINT_DATA {
19094    pub const ENCODED_LEN: usize = 22usize;
19095    pub const DEFAULT: Self = Self {
19096        time_boot_ms: 0_u32,
19097        roll: 0.0_f32,
19098        pitch: 0.0_f32,
19099        yaw: 0.0_f32,
19100        thrust: 0.0_f32,
19101        mode_switch: 0_u8,
19102        manual_override_switch: 0_u8,
19103    };
19104    #[cfg(feature = "arbitrary")]
19105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19106        use arbitrary::{Arbitrary, Unstructured};
19107        let mut buf = [0u8; 1024];
19108        rng.fill_bytes(&mut buf);
19109        let mut unstructured = Unstructured::new(&buf);
19110        Self::arbitrary(&mut unstructured).unwrap_or_default()
19111    }
19112}
19113impl Default for MANUAL_SETPOINT_DATA {
19114    fn default() -> Self {
19115        Self::DEFAULT.clone()
19116    }
19117}
19118impl MessageData for MANUAL_SETPOINT_DATA {
19119    type Message = MavMessage;
19120    const ID: u32 = 81u32;
19121    const NAME: &'static str = "MANUAL_SETPOINT";
19122    const EXTRA_CRC: u8 = 106u8;
19123    const ENCODED_LEN: usize = 22usize;
19124    fn deser(
19125        _version: MavlinkVersion,
19126        __input: &[u8],
19127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19128        let avail_len = __input.len();
19129        let mut payload_buf = [0; Self::ENCODED_LEN];
19130        let mut buf = if avail_len < Self::ENCODED_LEN {
19131            payload_buf[0..avail_len].copy_from_slice(__input);
19132            Bytes::new(&payload_buf)
19133        } else {
19134            Bytes::new(__input)
19135        };
19136        let mut __struct = Self::default();
19137        __struct.time_boot_ms = buf.get_u32_le();
19138        __struct.roll = buf.get_f32_le();
19139        __struct.pitch = buf.get_f32_le();
19140        __struct.yaw = buf.get_f32_le();
19141        __struct.thrust = buf.get_f32_le();
19142        __struct.mode_switch = buf.get_u8();
19143        __struct.manual_override_switch = buf.get_u8();
19144        Ok(__struct)
19145    }
19146    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19147        let mut __tmp = BytesMut::new(bytes);
19148        #[allow(clippy::absurd_extreme_comparisons)]
19149        #[allow(unused_comparisons)]
19150        if __tmp.remaining() < Self::ENCODED_LEN {
19151            panic!(
19152                "buffer is too small (need {} bytes, but got {})",
19153                Self::ENCODED_LEN,
19154                __tmp.remaining(),
19155            )
19156        }
19157        __tmp.put_u32_le(self.time_boot_ms);
19158        __tmp.put_f32_le(self.roll);
19159        __tmp.put_f32_le(self.pitch);
19160        __tmp.put_f32_le(self.yaw);
19161        __tmp.put_f32_le(self.thrust);
19162        __tmp.put_u8(self.mode_switch);
19163        __tmp.put_u8(self.manual_override_switch);
19164        if matches!(version, MavlinkVersion::V2) {
19165            let len = __tmp.len();
19166            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19167        } else {
19168            __tmp.len()
19169        }
19170    }
19171}
19172#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19173#[doc = ""]
19174#[doc = "ID: 249"]
19175#[derive(Debug, Clone, PartialEq)]
19176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19178#[cfg_attr(feature = "ts", derive(TS))]
19179#[cfg_attr(feature = "ts", ts(export))]
19180pub struct MEMORY_VECT_DATA {
19181    #[doc = "Starting address of the debug variables"]
19182    pub address: u16,
19183    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19184    pub ver: u8,
19185    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19186    pub mavtype: u8,
19187    #[doc = "Memory contents at specified address"]
19188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19190    pub value: [i8; 32],
19191}
19192impl MEMORY_VECT_DATA {
19193    pub const ENCODED_LEN: usize = 36usize;
19194    pub const DEFAULT: Self = Self {
19195        address: 0_u16,
19196        ver: 0_u8,
19197        mavtype: 0_u8,
19198        value: [0_i8; 32usize],
19199    };
19200    #[cfg(feature = "arbitrary")]
19201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19202        use arbitrary::{Arbitrary, Unstructured};
19203        let mut buf = [0u8; 1024];
19204        rng.fill_bytes(&mut buf);
19205        let mut unstructured = Unstructured::new(&buf);
19206        Self::arbitrary(&mut unstructured).unwrap_or_default()
19207    }
19208}
19209impl Default for MEMORY_VECT_DATA {
19210    fn default() -> Self {
19211        Self::DEFAULT.clone()
19212    }
19213}
19214impl MessageData for MEMORY_VECT_DATA {
19215    type Message = MavMessage;
19216    const ID: u32 = 249u32;
19217    const NAME: &'static str = "MEMORY_VECT";
19218    const EXTRA_CRC: u8 = 204u8;
19219    const ENCODED_LEN: usize = 36usize;
19220    fn deser(
19221        _version: MavlinkVersion,
19222        __input: &[u8],
19223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19224        let avail_len = __input.len();
19225        let mut payload_buf = [0; Self::ENCODED_LEN];
19226        let mut buf = if avail_len < Self::ENCODED_LEN {
19227            payload_buf[0..avail_len].copy_from_slice(__input);
19228            Bytes::new(&payload_buf)
19229        } else {
19230            Bytes::new(__input)
19231        };
19232        let mut __struct = Self::default();
19233        __struct.address = buf.get_u16_le();
19234        __struct.ver = buf.get_u8();
19235        __struct.mavtype = buf.get_u8();
19236        for v in &mut __struct.value {
19237            let val = buf.get_i8();
19238            *v = val;
19239        }
19240        Ok(__struct)
19241    }
19242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19243        let mut __tmp = BytesMut::new(bytes);
19244        #[allow(clippy::absurd_extreme_comparisons)]
19245        #[allow(unused_comparisons)]
19246        if __tmp.remaining() < Self::ENCODED_LEN {
19247            panic!(
19248                "buffer is too small (need {} bytes, but got {})",
19249                Self::ENCODED_LEN,
19250                __tmp.remaining(),
19251            )
19252        }
19253        __tmp.put_u16_le(self.address);
19254        __tmp.put_u8(self.ver);
19255        __tmp.put_u8(self.mavtype);
19256        for val in &self.value {
19257            __tmp.put_i8(*val);
19258        }
19259        if matches!(version, MavlinkVersion::V2) {
19260            let len = __tmp.len();
19261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19262        } else {
19263            __tmp.len()
19264        }
19265    }
19266}
19267#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19268#[doc = ""]
19269#[doc = "ID: 244"]
19270#[derive(Debug, Clone, PartialEq)]
19271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19273#[cfg_attr(feature = "ts", derive(TS))]
19274#[cfg_attr(feature = "ts", ts(export))]
19275pub struct MESSAGE_INTERVAL_DATA {
19276    #[doc = "0 indicates the interval at which it is sent."]
19277    pub interval_us: i32,
19278    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19279    pub message_id: u16,
19280}
19281impl MESSAGE_INTERVAL_DATA {
19282    pub const ENCODED_LEN: usize = 6usize;
19283    pub const DEFAULT: Self = Self {
19284        interval_us: 0_i32,
19285        message_id: 0_u16,
19286    };
19287    #[cfg(feature = "arbitrary")]
19288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19289        use arbitrary::{Arbitrary, Unstructured};
19290        let mut buf = [0u8; 1024];
19291        rng.fill_bytes(&mut buf);
19292        let mut unstructured = Unstructured::new(&buf);
19293        Self::arbitrary(&mut unstructured).unwrap_or_default()
19294    }
19295}
19296impl Default for MESSAGE_INTERVAL_DATA {
19297    fn default() -> Self {
19298        Self::DEFAULT.clone()
19299    }
19300}
19301impl MessageData for MESSAGE_INTERVAL_DATA {
19302    type Message = MavMessage;
19303    const ID: u32 = 244u32;
19304    const NAME: &'static str = "MESSAGE_INTERVAL";
19305    const EXTRA_CRC: u8 = 95u8;
19306    const ENCODED_LEN: usize = 6usize;
19307    fn deser(
19308        _version: MavlinkVersion,
19309        __input: &[u8],
19310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19311        let avail_len = __input.len();
19312        let mut payload_buf = [0; Self::ENCODED_LEN];
19313        let mut buf = if avail_len < Self::ENCODED_LEN {
19314            payload_buf[0..avail_len].copy_from_slice(__input);
19315            Bytes::new(&payload_buf)
19316        } else {
19317            Bytes::new(__input)
19318        };
19319        let mut __struct = Self::default();
19320        __struct.interval_us = buf.get_i32_le();
19321        __struct.message_id = buf.get_u16_le();
19322        Ok(__struct)
19323    }
19324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19325        let mut __tmp = BytesMut::new(bytes);
19326        #[allow(clippy::absurd_extreme_comparisons)]
19327        #[allow(unused_comparisons)]
19328        if __tmp.remaining() < Self::ENCODED_LEN {
19329            panic!(
19330                "buffer is too small (need {} bytes, but got {})",
19331                Self::ENCODED_LEN,
19332                __tmp.remaining(),
19333            )
19334        }
19335        __tmp.put_i32_le(self.interval_us);
19336        __tmp.put_u16_le(self.message_id);
19337        if matches!(version, MavlinkVersion::V2) {
19338            let len = __tmp.len();
19339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19340        } else {
19341            __tmp.len()
19342        }
19343    }
19344}
19345#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19346#[doc = ""]
19347#[doc = "ID: 47"]
19348#[derive(Debug, Clone, PartialEq)]
19349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19351#[cfg_attr(feature = "ts", derive(TS))]
19352#[cfg_attr(feature = "ts", ts(export))]
19353pub struct MISSION_ACK_DATA {
19354    #[doc = "System ID"]
19355    pub target_system: u8,
19356    #[doc = "Component ID"]
19357    pub target_component: u8,
19358    #[doc = "Mission result."]
19359    pub mavtype: MavMissionResult,
19360    #[doc = "Mission type."]
19361    #[cfg_attr(feature = "serde", serde(default))]
19362    pub mission_type: MavMissionType,
19363    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19365    pub opaque_id: u32,
19366}
19367impl MISSION_ACK_DATA {
19368    pub const ENCODED_LEN: usize = 8usize;
19369    pub const DEFAULT: Self = Self {
19370        target_system: 0_u8,
19371        target_component: 0_u8,
19372        mavtype: MavMissionResult::DEFAULT,
19373        mission_type: MavMissionType::DEFAULT,
19374        opaque_id: 0_u32,
19375    };
19376    #[cfg(feature = "arbitrary")]
19377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19378        use arbitrary::{Arbitrary, Unstructured};
19379        let mut buf = [0u8; 1024];
19380        rng.fill_bytes(&mut buf);
19381        let mut unstructured = Unstructured::new(&buf);
19382        Self::arbitrary(&mut unstructured).unwrap_or_default()
19383    }
19384}
19385impl Default for MISSION_ACK_DATA {
19386    fn default() -> Self {
19387        Self::DEFAULT.clone()
19388    }
19389}
19390impl MessageData for MISSION_ACK_DATA {
19391    type Message = MavMessage;
19392    const ID: u32 = 47u32;
19393    const NAME: &'static str = "MISSION_ACK";
19394    const EXTRA_CRC: u8 = 153u8;
19395    const ENCODED_LEN: usize = 8usize;
19396    fn deser(
19397        _version: MavlinkVersion,
19398        __input: &[u8],
19399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19400        let avail_len = __input.len();
19401        let mut payload_buf = [0; Self::ENCODED_LEN];
19402        let mut buf = if avail_len < Self::ENCODED_LEN {
19403            payload_buf[0..avail_len].copy_from_slice(__input);
19404            Bytes::new(&payload_buf)
19405        } else {
19406            Bytes::new(__input)
19407        };
19408        let mut __struct = Self::default();
19409        __struct.target_system = buf.get_u8();
19410        __struct.target_component = buf.get_u8();
19411        let tmp = buf.get_u8();
19412        __struct.mavtype =
19413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19414                enum_type: "MavMissionResult",
19415                value: tmp as u32,
19416            })?;
19417        let tmp = buf.get_u8();
19418        __struct.mission_type =
19419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19420                enum_type: "MavMissionType",
19421                value: tmp as u32,
19422            })?;
19423        __struct.opaque_id = buf.get_u32_le();
19424        Ok(__struct)
19425    }
19426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19427        let mut __tmp = BytesMut::new(bytes);
19428        #[allow(clippy::absurd_extreme_comparisons)]
19429        #[allow(unused_comparisons)]
19430        if __tmp.remaining() < Self::ENCODED_LEN {
19431            panic!(
19432                "buffer is too small (need {} bytes, but got {})",
19433                Self::ENCODED_LEN,
19434                __tmp.remaining(),
19435            )
19436        }
19437        __tmp.put_u8(self.target_system);
19438        __tmp.put_u8(self.target_component);
19439        __tmp.put_u8(self.mavtype as u8);
19440        if matches!(version, MavlinkVersion::V2) {
19441            __tmp.put_u8(self.mission_type as u8);
19442            __tmp.put_u32_le(self.opaque_id);
19443            let len = __tmp.len();
19444            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19445        } else {
19446            __tmp.len()
19447        }
19448    }
19449}
19450#[doc = "Delete all mission items at once."]
19451#[doc = ""]
19452#[doc = "ID: 45"]
19453#[derive(Debug, Clone, PartialEq)]
19454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19456#[cfg_attr(feature = "ts", derive(TS))]
19457#[cfg_attr(feature = "ts", ts(export))]
19458pub struct MISSION_CLEAR_ALL_DATA {
19459    #[doc = "System ID"]
19460    pub target_system: u8,
19461    #[doc = "Component ID"]
19462    pub target_component: u8,
19463    #[doc = "Mission type."]
19464    #[cfg_attr(feature = "serde", serde(default))]
19465    pub mission_type: MavMissionType,
19466}
19467impl MISSION_CLEAR_ALL_DATA {
19468    pub const ENCODED_LEN: usize = 3usize;
19469    pub const DEFAULT: Self = Self {
19470        target_system: 0_u8,
19471        target_component: 0_u8,
19472        mission_type: MavMissionType::DEFAULT,
19473    };
19474    #[cfg(feature = "arbitrary")]
19475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19476        use arbitrary::{Arbitrary, Unstructured};
19477        let mut buf = [0u8; 1024];
19478        rng.fill_bytes(&mut buf);
19479        let mut unstructured = Unstructured::new(&buf);
19480        Self::arbitrary(&mut unstructured).unwrap_or_default()
19481    }
19482}
19483impl Default for MISSION_CLEAR_ALL_DATA {
19484    fn default() -> Self {
19485        Self::DEFAULT.clone()
19486    }
19487}
19488impl MessageData for MISSION_CLEAR_ALL_DATA {
19489    type Message = MavMessage;
19490    const ID: u32 = 45u32;
19491    const NAME: &'static str = "MISSION_CLEAR_ALL";
19492    const EXTRA_CRC: u8 = 232u8;
19493    const ENCODED_LEN: usize = 3usize;
19494    fn deser(
19495        _version: MavlinkVersion,
19496        __input: &[u8],
19497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19498        let avail_len = __input.len();
19499        let mut payload_buf = [0; Self::ENCODED_LEN];
19500        let mut buf = if avail_len < Self::ENCODED_LEN {
19501            payload_buf[0..avail_len].copy_from_slice(__input);
19502            Bytes::new(&payload_buf)
19503        } else {
19504            Bytes::new(__input)
19505        };
19506        let mut __struct = Self::default();
19507        __struct.target_system = buf.get_u8();
19508        __struct.target_component = buf.get_u8();
19509        let tmp = buf.get_u8();
19510        __struct.mission_type =
19511            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19512                enum_type: "MavMissionType",
19513                value: tmp as u32,
19514            })?;
19515        Ok(__struct)
19516    }
19517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19518        let mut __tmp = BytesMut::new(bytes);
19519        #[allow(clippy::absurd_extreme_comparisons)]
19520        #[allow(unused_comparisons)]
19521        if __tmp.remaining() < Self::ENCODED_LEN {
19522            panic!(
19523                "buffer is too small (need {} bytes, but got {})",
19524                Self::ENCODED_LEN,
19525                __tmp.remaining(),
19526            )
19527        }
19528        __tmp.put_u8(self.target_system);
19529        __tmp.put_u8(self.target_component);
19530        if matches!(version, MavlinkVersion::V2) {
19531            __tmp.put_u8(self.mission_type as u8);
19532            let len = __tmp.len();
19533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19534        } else {
19535            __tmp.len()
19536        }
19537    }
19538}
19539#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19540#[doc = ""]
19541#[doc = "ID: 44"]
19542#[derive(Debug, Clone, PartialEq)]
19543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19545#[cfg_attr(feature = "ts", derive(TS))]
19546#[cfg_attr(feature = "ts", ts(export))]
19547pub struct MISSION_COUNT_DATA {
19548    #[doc = "Number of mission items in the sequence"]
19549    pub count: u16,
19550    #[doc = "System ID"]
19551    pub target_system: u8,
19552    #[doc = "Component ID"]
19553    pub target_component: u8,
19554    #[doc = "Mission type."]
19555    #[cfg_attr(feature = "serde", serde(default))]
19556    pub mission_type: MavMissionType,
19557    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19559    pub opaque_id: u32,
19560}
19561impl MISSION_COUNT_DATA {
19562    pub const ENCODED_LEN: usize = 9usize;
19563    pub const DEFAULT: Self = Self {
19564        count: 0_u16,
19565        target_system: 0_u8,
19566        target_component: 0_u8,
19567        mission_type: MavMissionType::DEFAULT,
19568        opaque_id: 0_u32,
19569    };
19570    #[cfg(feature = "arbitrary")]
19571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19572        use arbitrary::{Arbitrary, Unstructured};
19573        let mut buf = [0u8; 1024];
19574        rng.fill_bytes(&mut buf);
19575        let mut unstructured = Unstructured::new(&buf);
19576        Self::arbitrary(&mut unstructured).unwrap_or_default()
19577    }
19578}
19579impl Default for MISSION_COUNT_DATA {
19580    fn default() -> Self {
19581        Self::DEFAULT.clone()
19582    }
19583}
19584impl MessageData for MISSION_COUNT_DATA {
19585    type Message = MavMessage;
19586    const ID: u32 = 44u32;
19587    const NAME: &'static str = "MISSION_COUNT";
19588    const EXTRA_CRC: u8 = 221u8;
19589    const ENCODED_LEN: usize = 9usize;
19590    fn deser(
19591        _version: MavlinkVersion,
19592        __input: &[u8],
19593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19594        let avail_len = __input.len();
19595        let mut payload_buf = [0; Self::ENCODED_LEN];
19596        let mut buf = if avail_len < Self::ENCODED_LEN {
19597            payload_buf[0..avail_len].copy_from_slice(__input);
19598            Bytes::new(&payload_buf)
19599        } else {
19600            Bytes::new(__input)
19601        };
19602        let mut __struct = Self::default();
19603        __struct.count = buf.get_u16_le();
19604        __struct.target_system = buf.get_u8();
19605        __struct.target_component = buf.get_u8();
19606        let tmp = buf.get_u8();
19607        __struct.mission_type =
19608            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19609                enum_type: "MavMissionType",
19610                value: tmp as u32,
19611            })?;
19612        __struct.opaque_id = buf.get_u32_le();
19613        Ok(__struct)
19614    }
19615    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19616        let mut __tmp = BytesMut::new(bytes);
19617        #[allow(clippy::absurd_extreme_comparisons)]
19618        #[allow(unused_comparisons)]
19619        if __tmp.remaining() < Self::ENCODED_LEN {
19620            panic!(
19621                "buffer is too small (need {} bytes, but got {})",
19622                Self::ENCODED_LEN,
19623                __tmp.remaining(),
19624            )
19625        }
19626        __tmp.put_u16_le(self.count);
19627        __tmp.put_u8(self.target_system);
19628        __tmp.put_u8(self.target_component);
19629        if matches!(version, MavlinkVersion::V2) {
19630            __tmp.put_u8(self.mission_type as u8);
19631            __tmp.put_u32_le(self.opaque_id);
19632            let len = __tmp.len();
19633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19634        } else {
19635            __tmp.len()
19636        }
19637    }
19638}
19639#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19640#[doc = ""]
19641#[doc = "ID: 42"]
19642#[derive(Debug, Clone, PartialEq)]
19643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19645#[cfg_attr(feature = "ts", derive(TS))]
19646#[cfg_attr(feature = "ts", ts(export))]
19647pub struct MISSION_CURRENT_DATA {
19648    #[doc = "Sequence"]
19649    pub seq: u16,
19650    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19652    pub total: u16,
19653    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19654    #[cfg_attr(feature = "serde", serde(default))]
19655    pub mission_state: MissionState,
19656    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19658    pub mission_mode: u8,
19659    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19661    pub mission_id: u32,
19662    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19664    pub fence_id: u32,
19665    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19667    pub rally_points_id: u32,
19668}
19669impl MISSION_CURRENT_DATA {
19670    pub const ENCODED_LEN: usize = 18usize;
19671    pub const DEFAULT: Self = Self {
19672        seq: 0_u16,
19673        total: 0_u16,
19674        mission_state: MissionState::DEFAULT,
19675        mission_mode: 0_u8,
19676        mission_id: 0_u32,
19677        fence_id: 0_u32,
19678        rally_points_id: 0_u32,
19679    };
19680    #[cfg(feature = "arbitrary")]
19681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19682        use arbitrary::{Arbitrary, Unstructured};
19683        let mut buf = [0u8; 1024];
19684        rng.fill_bytes(&mut buf);
19685        let mut unstructured = Unstructured::new(&buf);
19686        Self::arbitrary(&mut unstructured).unwrap_or_default()
19687    }
19688}
19689impl Default for MISSION_CURRENT_DATA {
19690    fn default() -> Self {
19691        Self::DEFAULT.clone()
19692    }
19693}
19694impl MessageData for MISSION_CURRENT_DATA {
19695    type Message = MavMessage;
19696    const ID: u32 = 42u32;
19697    const NAME: &'static str = "MISSION_CURRENT";
19698    const EXTRA_CRC: u8 = 28u8;
19699    const ENCODED_LEN: usize = 18usize;
19700    fn deser(
19701        _version: MavlinkVersion,
19702        __input: &[u8],
19703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19704        let avail_len = __input.len();
19705        let mut payload_buf = [0; Self::ENCODED_LEN];
19706        let mut buf = if avail_len < Self::ENCODED_LEN {
19707            payload_buf[0..avail_len].copy_from_slice(__input);
19708            Bytes::new(&payload_buf)
19709        } else {
19710            Bytes::new(__input)
19711        };
19712        let mut __struct = Self::default();
19713        __struct.seq = buf.get_u16_le();
19714        __struct.total = buf.get_u16_le();
19715        let tmp = buf.get_u8();
19716        __struct.mission_state =
19717            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19718                enum_type: "MissionState",
19719                value: tmp as u32,
19720            })?;
19721        __struct.mission_mode = buf.get_u8();
19722        __struct.mission_id = buf.get_u32_le();
19723        __struct.fence_id = buf.get_u32_le();
19724        __struct.rally_points_id = buf.get_u32_le();
19725        Ok(__struct)
19726    }
19727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19728        let mut __tmp = BytesMut::new(bytes);
19729        #[allow(clippy::absurd_extreme_comparisons)]
19730        #[allow(unused_comparisons)]
19731        if __tmp.remaining() < Self::ENCODED_LEN {
19732            panic!(
19733                "buffer is too small (need {} bytes, but got {})",
19734                Self::ENCODED_LEN,
19735                __tmp.remaining(),
19736            )
19737        }
19738        __tmp.put_u16_le(self.seq);
19739        if matches!(version, MavlinkVersion::V2) {
19740            __tmp.put_u16_le(self.total);
19741            __tmp.put_u8(self.mission_state as u8);
19742            __tmp.put_u8(self.mission_mode);
19743            __tmp.put_u32_le(self.mission_id);
19744            __tmp.put_u32_le(self.fence_id);
19745            __tmp.put_u32_le(self.rally_points_id);
19746            let len = __tmp.len();
19747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19748        } else {
19749            __tmp.len()
19750        }
19751    }
19752}
19753#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19754#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19755#[doc = ""]
19756#[doc = "ID: 39"]
19757#[derive(Debug, Clone, PartialEq)]
19758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19760#[cfg_attr(feature = "ts", derive(TS))]
19761#[cfg_attr(feature = "ts", ts(export))]
19762pub struct MISSION_ITEM_DATA {
19763    #[doc = "PARAM1, see MAV_CMD enum"]
19764    pub param1: f32,
19765    #[doc = "PARAM2, see MAV_CMD enum"]
19766    pub param2: f32,
19767    #[doc = "PARAM3, see MAV_CMD enum"]
19768    pub param3: f32,
19769    #[doc = "PARAM4, see MAV_CMD enum"]
19770    pub param4: f32,
19771    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19772    pub x: f32,
19773    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19774    pub y: f32,
19775    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19776    pub z: f32,
19777    #[doc = "Sequence"]
19778    pub seq: u16,
19779    #[doc = "The scheduled action for the waypoint."]
19780    pub command: MavCmd,
19781    #[doc = "System ID"]
19782    pub target_system: u8,
19783    #[doc = "Component ID"]
19784    pub target_component: u8,
19785    #[doc = "The coordinate system of the waypoint."]
19786    pub frame: MavFrame,
19787    #[doc = "false:0, true:1"]
19788    pub current: u8,
19789    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19790    pub autocontinue: u8,
19791    #[doc = "Mission type."]
19792    #[cfg_attr(feature = "serde", serde(default))]
19793    pub mission_type: MavMissionType,
19794}
19795impl MISSION_ITEM_DATA {
19796    pub const ENCODED_LEN: usize = 38usize;
19797    pub const DEFAULT: Self = Self {
19798        param1: 0.0_f32,
19799        param2: 0.0_f32,
19800        param3: 0.0_f32,
19801        param4: 0.0_f32,
19802        x: 0.0_f32,
19803        y: 0.0_f32,
19804        z: 0.0_f32,
19805        seq: 0_u16,
19806        command: MavCmd::DEFAULT,
19807        target_system: 0_u8,
19808        target_component: 0_u8,
19809        frame: MavFrame::DEFAULT,
19810        current: 0_u8,
19811        autocontinue: 0_u8,
19812        mission_type: MavMissionType::DEFAULT,
19813    };
19814    #[cfg(feature = "arbitrary")]
19815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19816        use arbitrary::{Arbitrary, Unstructured};
19817        let mut buf = [0u8; 1024];
19818        rng.fill_bytes(&mut buf);
19819        let mut unstructured = Unstructured::new(&buf);
19820        Self::arbitrary(&mut unstructured).unwrap_or_default()
19821    }
19822}
19823impl Default for MISSION_ITEM_DATA {
19824    fn default() -> Self {
19825        Self::DEFAULT.clone()
19826    }
19827}
19828impl MessageData for MISSION_ITEM_DATA {
19829    type Message = MavMessage;
19830    const ID: u32 = 39u32;
19831    const NAME: &'static str = "MISSION_ITEM";
19832    const EXTRA_CRC: u8 = 254u8;
19833    const ENCODED_LEN: usize = 38usize;
19834    fn deser(
19835        _version: MavlinkVersion,
19836        __input: &[u8],
19837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19838        let avail_len = __input.len();
19839        let mut payload_buf = [0; Self::ENCODED_LEN];
19840        let mut buf = if avail_len < Self::ENCODED_LEN {
19841            payload_buf[0..avail_len].copy_from_slice(__input);
19842            Bytes::new(&payload_buf)
19843        } else {
19844            Bytes::new(__input)
19845        };
19846        let mut __struct = Self::default();
19847        __struct.param1 = buf.get_f32_le();
19848        __struct.param2 = buf.get_f32_le();
19849        __struct.param3 = buf.get_f32_le();
19850        __struct.param4 = buf.get_f32_le();
19851        __struct.x = buf.get_f32_le();
19852        __struct.y = buf.get_f32_le();
19853        __struct.z = buf.get_f32_le();
19854        __struct.seq = buf.get_u16_le();
19855        let tmp = buf.get_u16_le();
19856        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19857            ::mavlink_core::error::ParserError::InvalidEnum {
19858                enum_type: "MavCmd",
19859                value: tmp as u32,
19860            },
19861        )?;
19862        __struct.target_system = buf.get_u8();
19863        __struct.target_component = buf.get_u8();
19864        let tmp = buf.get_u8();
19865        __struct.frame =
19866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19867                enum_type: "MavFrame",
19868                value: tmp as u32,
19869            })?;
19870        __struct.current = buf.get_u8();
19871        __struct.autocontinue = buf.get_u8();
19872        let tmp = buf.get_u8();
19873        __struct.mission_type =
19874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19875                enum_type: "MavMissionType",
19876                value: tmp as u32,
19877            })?;
19878        Ok(__struct)
19879    }
19880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19881        let mut __tmp = BytesMut::new(bytes);
19882        #[allow(clippy::absurd_extreme_comparisons)]
19883        #[allow(unused_comparisons)]
19884        if __tmp.remaining() < Self::ENCODED_LEN {
19885            panic!(
19886                "buffer is too small (need {} bytes, but got {})",
19887                Self::ENCODED_LEN,
19888                __tmp.remaining(),
19889            )
19890        }
19891        __tmp.put_f32_le(self.param1);
19892        __tmp.put_f32_le(self.param2);
19893        __tmp.put_f32_le(self.param3);
19894        __tmp.put_f32_le(self.param4);
19895        __tmp.put_f32_le(self.x);
19896        __tmp.put_f32_le(self.y);
19897        __tmp.put_f32_le(self.z);
19898        __tmp.put_u16_le(self.seq);
19899        __tmp.put_u16_le(self.command as u16);
19900        __tmp.put_u8(self.target_system);
19901        __tmp.put_u8(self.target_component);
19902        __tmp.put_u8(self.frame as u8);
19903        __tmp.put_u8(self.current);
19904        __tmp.put_u8(self.autocontinue);
19905        if matches!(version, MavlinkVersion::V2) {
19906            __tmp.put_u8(self.mission_type as u8);
19907            let len = __tmp.len();
19908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19909        } else {
19910            __tmp.len()
19911        }
19912    }
19913}
19914#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19915#[doc = ""]
19916#[doc = "ID: 73"]
19917#[derive(Debug, Clone, PartialEq)]
19918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19920#[cfg_attr(feature = "ts", derive(TS))]
19921#[cfg_attr(feature = "ts", ts(export))]
19922pub struct MISSION_ITEM_INT_DATA {
19923    #[doc = "PARAM1, see MAV_CMD enum"]
19924    pub param1: f32,
19925    #[doc = "PARAM2, see MAV_CMD enum"]
19926    pub param2: f32,
19927    #[doc = "PARAM3, see MAV_CMD enum"]
19928    pub param3: f32,
19929    #[doc = "PARAM4, see MAV_CMD enum"]
19930    pub param4: f32,
19931    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19932    pub x: i32,
19933    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19934    pub y: i32,
19935    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19936    pub z: f32,
19937    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19938    pub seq: u16,
19939    #[doc = "The scheduled action for the waypoint."]
19940    pub command: MavCmd,
19941    #[doc = "System ID"]
19942    pub target_system: u8,
19943    #[doc = "Component ID"]
19944    pub target_component: u8,
19945    #[doc = "The coordinate system of the waypoint."]
19946    pub frame: MavFrame,
19947    #[doc = "false:0, true:1"]
19948    pub current: u8,
19949    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19950    pub autocontinue: u8,
19951    #[doc = "Mission type."]
19952    #[cfg_attr(feature = "serde", serde(default))]
19953    pub mission_type: MavMissionType,
19954}
19955impl MISSION_ITEM_INT_DATA {
19956    pub const ENCODED_LEN: usize = 38usize;
19957    pub const DEFAULT: Self = Self {
19958        param1: 0.0_f32,
19959        param2: 0.0_f32,
19960        param3: 0.0_f32,
19961        param4: 0.0_f32,
19962        x: 0_i32,
19963        y: 0_i32,
19964        z: 0.0_f32,
19965        seq: 0_u16,
19966        command: MavCmd::DEFAULT,
19967        target_system: 0_u8,
19968        target_component: 0_u8,
19969        frame: MavFrame::DEFAULT,
19970        current: 0_u8,
19971        autocontinue: 0_u8,
19972        mission_type: MavMissionType::DEFAULT,
19973    };
19974    #[cfg(feature = "arbitrary")]
19975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19976        use arbitrary::{Arbitrary, Unstructured};
19977        let mut buf = [0u8; 1024];
19978        rng.fill_bytes(&mut buf);
19979        let mut unstructured = Unstructured::new(&buf);
19980        Self::arbitrary(&mut unstructured).unwrap_or_default()
19981    }
19982}
19983impl Default for MISSION_ITEM_INT_DATA {
19984    fn default() -> Self {
19985        Self::DEFAULT.clone()
19986    }
19987}
19988impl MessageData for MISSION_ITEM_INT_DATA {
19989    type Message = MavMessage;
19990    const ID: u32 = 73u32;
19991    const NAME: &'static str = "MISSION_ITEM_INT";
19992    const EXTRA_CRC: u8 = 38u8;
19993    const ENCODED_LEN: usize = 38usize;
19994    fn deser(
19995        _version: MavlinkVersion,
19996        __input: &[u8],
19997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19998        let avail_len = __input.len();
19999        let mut payload_buf = [0; Self::ENCODED_LEN];
20000        let mut buf = if avail_len < Self::ENCODED_LEN {
20001            payload_buf[0..avail_len].copy_from_slice(__input);
20002            Bytes::new(&payload_buf)
20003        } else {
20004            Bytes::new(__input)
20005        };
20006        let mut __struct = Self::default();
20007        __struct.param1 = buf.get_f32_le();
20008        __struct.param2 = buf.get_f32_le();
20009        __struct.param3 = buf.get_f32_le();
20010        __struct.param4 = buf.get_f32_le();
20011        __struct.x = buf.get_i32_le();
20012        __struct.y = buf.get_i32_le();
20013        __struct.z = buf.get_f32_le();
20014        __struct.seq = buf.get_u16_le();
20015        let tmp = buf.get_u16_le();
20016        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20017            ::mavlink_core::error::ParserError::InvalidEnum {
20018                enum_type: "MavCmd",
20019                value: tmp as u32,
20020            },
20021        )?;
20022        __struct.target_system = buf.get_u8();
20023        __struct.target_component = buf.get_u8();
20024        let tmp = buf.get_u8();
20025        __struct.frame =
20026            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20027                enum_type: "MavFrame",
20028                value: tmp as u32,
20029            })?;
20030        __struct.current = buf.get_u8();
20031        __struct.autocontinue = buf.get_u8();
20032        let tmp = buf.get_u8();
20033        __struct.mission_type =
20034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20035                enum_type: "MavMissionType",
20036                value: tmp as u32,
20037            })?;
20038        Ok(__struct)
20039    }
20040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20041        let mut __tmp = BytesMut::new(bytes);
20042        #[allow(clippy::absurd_extreme_comparisons)]
20043        #[allow(unused_comparisons)]
20044        if __tmp.remaining() < Self::ENCODED_LEN {
20045            panic!(
20046                "buffer is too small (need {} bytes, but got {})",
20047                Self::ENCODED_LEN,
20048                __tmp.remaining(),
20049            )
20050        }
20051        __tmp.put_f32_le(self.param1);
20052        __tmp.put_f32_le(self.param2);
20053        __tmp.put_f32_le(self.param3);
20054        __tmp.put_f32_le(self.param4);
20055        __tmp.put_i32_le(self.x);
20056        __tmp.put_i32_le(self.y);
20057        __tmp.put_f32_le(self.z);
20058        __tmp.put_u16_le(self.seq);
20059        __tmp.put_u16_le(self.command as u16);
20060        __tmp.put_u8(self.target_system);
20061        __tmp.put_u8(self.target_component);
20062        __tmp.put_u8(self.frame as u8);
20063        __tmp.put_u8(self.current);
20064        __tmp.put_u8(self.autocontinue);
20065        if matches!(version, MavlinkVersion::V2) {
20066            __tmp.put_u8(self.mission_type as u8);
20067            let len = __tmp.len();
20068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20069        } else {
20070            __tmp.len()
20071        }
20072    }
20073}
20074#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20075#[doc = ""]
20076#[doc = "ID: 46"]
20077#[derive(Debug, Clone, PartialEq)]
20078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20080#[cfg_attr(feature = "ts", derive(TS))]
20081#[cfg_attr(feature = "ts", ts(export))]
20082pub struct MISSION_ITEM_REACHED_DATA {
20083    #[doc = "Sequence"]
20084    pub seq: u16,
20085}
20086impl MISSION_ITEM_REACHED_DATA {
20087    pub const ENCODED_LEN: usize = 2usize;
20088    pub const DEFAULT: Self = Self { seq: 0_u16 };
20089    #[cfg(feature = "arbitrary")]
20090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20091        use arbitrary::{Arbitrary, Unstructured};
20092        let mut buf = [0u8; 1024];
20093        rng.fill_bytes(&mut buf);
20094        let mut unstructured = Unstructured::new(&buf);
20095        Self::arbitrary(&mut unstructured).unwrap_or_default()
20096    }
20097}
20098impl Default for MISSION_ITEM_REACHED_DATA {
20099    fn default() -> Self {
20100        Self::DEFAULT.clone()
20101    }
20102}
20103impl MessageData for MISSION_ITEM_REACHED_DATA {
20104    type Message = MavMessage;
20105    const ID: u32 = 46u32;
20106    const NAME: &'static str = "MISSION_ITEM_REACHED";
20107    const EXTRA_CRC: u8 = 11u8;
20108    const ENCODED_LEN: usize = 2usize;
20109    fn deser(
20110        _version: MavlinkVersion,
20111        __input: &[u8],
20112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20113        let avail_len = __input.len();
20114        let mut payload_buf = [0; Self::ENCODED_LEN];
20115        let mut buf = if avail_len < Self::ENCODED_LEN {
20116            payload_buf[0..avail_len].copy_from_slice(__input);
20117            Bytes::new(&payload_buf)
20118        } else {
20119            Bytes::new(__input)
20120        };
20121        let mut __struct = Self::default();
20122        __struct.seq = buf.get_u16_le();
20123        Ok(__struct)
20124    }
20125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20126        let mut __tmp = BytesMut::new(bytes);
20127        #[allow(clippy::absurd_extreme_comparisons)]
20128        #[allow(unused_comparisons)]
20129        if __tmp.remaining() < Self::ENCODED_LEN {
20130            panic!(
20131                "buffer is too small (need {} bytes, but got {})",
20132                Self::ENCODED_LEN,
20133                __tmp.remaining(),
20134            )
20135        }
20136        __tmp.put_u16_le(self.seq);
20137        if matches!(version, MavlinkVersion::V2) {
20138            let len = __tmp.len();
20139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20140        } else {
20141            __tmp.len()
20142        }
20143    }
20144}
20145#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20146#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20147#[doc = ""]
20148#[doc = "ID: 40"]
20149#[derive(Debug, Clone, PartialEq)]
20150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20152#[cfg_attr(feature = "ts", derive(TS))]
20153#[cfg_attr(feature = "ts", ts(export))]
20154pub struct MISSION_REQUEST_DATA {
20155    #[doc = "Sequence"]
20156    pub seq: u16,
20157    #[doc = "System ID"]
20158    pub target_system: u8,
20159    #[doc = "Component ID"]
20160    pub target_component: u8,
20161    #[doc = "Mission type."]
20162    #[cfg_attr(feature = "serde", serde(default))]
20163    pub mission_type: MavMissionType,
20164}
20165impl MISSION_REQUEST_DATA {
20166    pub const ENCODED_LEN: usize = 5usize;
20167    pub const DEFAULT: Self = Self {
20168        seq: 0_u16,
20169        target_system: 0_u8,
20170        target_component: 0_u8,
20171        mission_type: MavMissionType::DEFAULT,
20172    };
20173    #[cfg(feature = "arbitrary")]
20174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20175        use arbitrary::{Arbitrary, Unstructured};
20176        let mut buf = [0u8; 1024];
20177        rng.fill_bytes(&mut buf);
20178        let mut unstructured = Unstructured::new(&buf);
20179        Self::arbitrary(&mut unstructured).unwrap_or_default()
20180    }
20181}
20182impl Default for MISSION_REQUEST_DATA {
20183    fn default() -> Self {
20184        Self::DEFAULT.clone()
20185    }
20186}
20187impl MessageData for MISSION_REQUEST_DATA {
20188    type Message = MavMessage;
20189    const ID: u32 = 40u32;
20190    const NAME: &'static str = "MISSION_REQUEST";
20191    const EXTRA_CRC: u8 = 230u8;
20192    const ENCODED_LEN: usize = 5usize;
20193    fn deser(
20194        _version: MavlinkVersion,
20195        __input: &[u8],
20196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20197        let avail_len = __input.len();
20198        let mut payload_buf = [0; Self::ENCODED_LEN];
20199        let mut buf = if avail_len < Self::ENCODED_LEN {
20200            payload_buf[0..avail_len].copy_from_slice(__input);
20201            Bytes::new(&payload_buf)
20202        } else {
20203            Bytes::new(__input)
20204        };
20205        let mut __struct = Self::default();
20206        __struct.seq = buf.get_u16_le();
20207        __struct.target_system = buf.get_u8();
20208        __struct.target_component = buf.get_u8();
20209        let tmp = buf.get_u8();
20210        __struct.mission_type =
20211            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20212                enum_type: "MavMissionType",
20213                value: tmp as u32,
20214            })?;
20215        Ok(__struct)
20216    }
20217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20218        let mut __tmp = BytesMut::new(bytes);
20219        #[allow(clippy::absurd_extreme_comparisons)]
20220        #[allow(unused_comparisons)]
20221        if __tmp.remaining() < Self::ENCODED_LEN {
20222            panic!(
20223                "buffer is too small (need {} bytes, but got {})",
20224                Self::ENCODED_LEN,
20225                __tmp.remaining(),
20226            )
20227        }
20228        __tmp.put_u16_le(self.seq);
20229        __tmp.put_u8(self.target_system);
20230        __tmp.put_u8(self.target_component);
20231        if matches!(version, MavlinkVersion::V2) {
20232            __tmp.put_u8(self.mission_type as u8);
20233            let len = __tmp.len();
20234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20235        } else {
20236            __tmp.len()
20237        }
20238    }
20239}
20240#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20241#[doc = ""]
20242#[doc = "ID: 51"]
20243#[derive(Debug, Clone, PartialEq)]
20244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20246#[cfg_attr(feature = "ts", derive(TS))]
20247#[cfg_attr(feature = "ts", ts(export))]
20248pub struct MISSION_REQUEST_INT_DATA {
20249    #[doc = "Sequence"]
20250    pub seq: u16,
20251    #[doc = "System ID"]
20252    pub target_system: u8,
20253    #[doc = "Component ID"]
20254    pub target_component: u8,
20255    #[doc = "Mission type."]
20256    #[cfg_attr(feature = "serde", serde(default))]
20257    pub mission_type: MavMissionType,
20258}
20259impl MISSION_REQUEST_INT_DATA {
20260    pub const ENCODED_LEN: usize = 5usize;
20261    pub const DEFAULT: Self = Self {
20262        seq: 0_u16,
20263        target_system: 0_u8,
20264        target_component: 0_u8,
20265        mission_type: MavMissionType::DEFAULT,
20266    };
20267    #[cfg(feature = "arbitrary")]
20268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20269        use arbitrary::{Arbitrary, Unstructured};
20270        let mut buf = [0u8; 1024];
20271        rng.fill_bytes(&mut buf);
20272        let mut unstructured = Unstructured::new(&buf);
20273        Self::arbitrary(&mut unstructured).unwrap_or_default()
20274    }
20275}
20276impl Default for MISSION_REQUEST_INT_DATA {
20277    fn default() -> Self {
20278        Self::DEFAULT.clone()
20279    }
20280}
20281impl MessageData for MISSION_REQUEST_INT_DATA {
20282    type Message = MavMessage;
20283    const ID: u32 = 51u32;
20284    const NAME: &'static str = "MISSION_REQUEST_INT";
20285    const EXTRA_CRC: u8 = 196u8;
20286    const ENCODED_LEN: usize = 5usize;
20287    fn deser(
20288        _version: MavlinkVersion,
20289        __input: &[u8],
20290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20291        let avail_len = __input.len();
20292        let mut payload_buf = [0; Self::ENCODED_LEN];
20293        let mut buf = if avail_len < Self::ENCODED_LEN {
20294            payload_buf[0..avail_len].copy_from_slice(__input);
20295            Bytes::new(&payload_buf)
20296        } else {
20297            Bytes::new(__input)
20298        };
20299        let mut __struct = Self::default();
20300        __struct.seq = buf.get_u16_le();
20301        __struct.target_system = buf.get_u8();
20302        __struct.target_component = buf.get_u8();
20303        let tmp = buf.get_u8();
20304        __struct.mission_type =
20305            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20306                enum_type: "MavMissionType",
20307                value: tmp as u32,
20308            })?;
20309        Ok(__struct)
20310    }
20311    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20312        let mut __tmp = BytesMut::new(bytes);
20313        #[allow(clippy::absurd_extreme_comparisons)]
20314        #[allow(unused_comparisons)]
20315        if __tmp.remaining() < Self::ENCODED_LEN {
20316            panic!(
20317                "buffer is too small (need {} bytes, but got {})",
20318                Self::ENCODED_LEN,
20319                __tmp.remaining(),
20320            )
20321        }
20322        __tmp.put_u16_le(self.seq);
20323        __tmp.put_u8(self.target_system);
20324        __tmp.put_u8(self.target_component);
20325        if matches!(version, MavlinkVersion::V2) {
20326            __tmp.put_u8(self.mission_type as u8);
20327            let len = __tmp.len();
20328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20329        } else {
20330            __tmp.len()
20331        }
20332    }
20333}
20334#[doc = "Request the overall list of mission items from the system/component."]
20335#[doc = ""]
20336#[doc = "ID: 43"]
20337#[derive(Debug, Clone, PartialEq)]
20338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20340#[cfg_attr(feature = "ts", derive(TS))]
20341#[cfg_attr(feature = "ts", ts(export))]
20342pub struct MISSION_REQUEST_LIST_DATA {
20343    #[doc = "System ID"]
20344    pub target_system: u8,
20345    #[doc = "Component ID"]
20346    pub target_component: u8,
20347    #[doc = "Mission type."]
20348    #[cfg_attr(feature = "serde", serde(default))]
20349    pub mission_type: MavMissionType,
20350}
20351impl MISSION_REQUEST_LIST_DATA {
20352    pub const ENCODED_LEN: usize = 3usize;
20353    pub const DEFAULT: Self = Self {
20354        target_system: 0_u8,
20355        target_component: 0_u8,
20356        mission_type: MavMissionType::DEFAULT,
20357    };
20358    #[cfg(feature = "arbitrary")]
20359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20360        use arbitrary::{Arbitrary, Unstructured};
20361        let mut buf = [0u8; 1024];
20362        rng.fill_bytes(&mut buf);
20363        let mut unstructured = Unstructured::new(&buf);
20364        Self::arbitrary(&mut unstructured).unwrap_or_default()
20365    }
20366}
20367impl Default for MISSION_REQUEST_LIST_DATA {
20368    fn default() -> Self {
20369        Self::DEFAULT.clone()
20370    }
20371}
20372impl MessageData for MISSION_REQUEST_LIST_DATA {
20373    type Message = MavMessage;
20374    const ID: u32 = 43u32;
20375    const NAME: &'static str = "MISSION_REQUEST_LIST";
20376    const EXTRA_CRC: u8 = 132u8;
20377    const ENCODED_LEN: usize = 3usize;
20378    fn deser(
20379        _version: MavlinkVersion,
20380        __input: &[u8],
20381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20382        let avail_len = __input.len();
20383        let mut payload_buf = [0; Self::ENCODED_LEN];
20384        let mut buf = if avail_len < Self::ENCODED_LEN {
20385            payload_buf[0..avail_len].copy_from_slice(__input);
20386            Bytes::new(&payload_buf)
20387        } else {
20388            Bytes::new(__input)
20389        };
20390        let mut __struct = Self::default();
20391        __struct.target_system = buf.get_u8();
20392        __struct.target_component = buf.get_u8();
20393        let tmp = buf.get_u8();
20394        __struct.mission_type =
20395            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20396                enum_type: "MavMissionType",
20397                value: tmp as u32,
20398            })?;
20399        Ok(__struct)
20400    }
20401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20402        let mut __tmp = BytesMut::new(bytes);
20403        #[allow(clippy::absurd_extreme_comparisons)]
20404        #[allow(unused_comparisons)]
20405        if __tmp.remaining() < Self::ENCODED_LEN {
20406            panic!(
20407                "buffer is too small (need {} bytes, but got {})",
20408                Self::ENCODED_LEN,
20409                __tmp.remaining(),
20410            )
20411        }
20412        __tmp.put_u8(self.target_system);
20413        __tmp.put_u8(self.target_component);
20414        if matches!(version, MavlinkVersion::V2) {
20415            __tmp.put_u8(self.mission_type as u8);
20416            let len = __tmp.len();
20417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20418        } else {
20419            __tmp.len()
20420        }
20421    }
20422}
20423#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20424#[doc = ""]
20425#[doc = "ID: 37"]
20426#[derive(Debug, Clone, PartialEq)]
20427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20429#[cfg_attr(feature = "ts", derive(TS))]
20430#[cfg_attr(feature = "ts", ts(export))]
20431pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20432    #[doc = "Start index"]
20433    pub start_index: i16,
20434    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20435    pub end_index: i16,
20436    #[doc = "System ID"]
20437    pub target_system: u8,
20438    #[doc = "Component ID"]
20439    pub target_component: u8,
20440    #[doc = "Mission type."]
20441    #[cfg_attr(feature = "serde", serde(default))]
20442    pub mission_type: MavMissionType,
20443}
20444impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20445    pub const ENCODED_LEN: usize = 7usize;
20446    pub const DEFAULT: Self = Self {
20447        start_index: 0_i16,
20448        end_index: 0_i16,
20449        target_system: 0_u8,
20450        target_component: 0_u8,
20451        mission_type: MavMissionType::DEFAULT,
20452    };
20453    #[cfg(feature = "arbitrary")]
20454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20455        use arbitrary::{Arbitrary, Unstructured};
20456        let mut buf = [0u8; 1024];
20457        rng.fill_bytes(&mut buf);
20458        let mut unstructured = Unstructured::new(&buf);
20459        Self::arbitrary(&mut unstructured).unwrap_or_default()
20460    }
20461}
20462impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20463    fn default() -> Self {
20464        Self::DEFAULT.clone()
20465    }
20466}
20467impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20468    type Message = MavMessage;
20469    const ID: u32 = 37u32;
20470    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20471    const EXTRA_CRC: u8 = 212u8;
20472    const ENCODED_LEN: usize = 7usize;
20473    fn deser(
20474        _version: MavlinkVersion,
20475        __input: &[u8],
20476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20477        let avail_len = __input.len();
20478        let mut payload_buf = [0; Self::ENCODED_LEN];
20479        let mut buf = if avail_len < Self::ENCODED_LEN {
20480            payload_buf[0..avail_len].copy_from_slice(__input);
20481            Bytes::new(&payload_buf)
20482        } else {
20483            Bytes::new(__input)
20484        };
20485        let mut __struct = Self::default();
20486        __struct.start_index = buf.get_i16_le();
20487        __struct.end_index = buf.get_i16_le();
20488        __struct.target_system = buf.get_u8();
20489        __struct.target_component = buf.get_u8();
20490        let tmp = buf.get_u8();
20491        __struct.mission_type =
20492            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20493                enum_type: "MavMissionType",
20494                value: tmp as u32,
20495            })?;
20496        Ok(__struct)
20497    }
20498    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20499        let mut __tmp = BytesMut::new(bytes);
20500        #[allow(clippy::absurd_extreme_comparisons)]
20501        #[allow(unused_comparisons)]
20502        if __tmp.remaining() < Self::ENCODED_LEN {
20503            panic!(
20504                "buffer is too small (need {} bytes, but got {})",
20505                Self::ENCODED_LEN,
20506                __tmp.remaining(),
20507            )
20508        }
20509        __tmp.put_i16_le(self.start_index);
20510        __tmp.put_i16_le(self.end_index);
20511        __tmp.put_u8(self.target_system);
20512        __tmp.put_u8(self.target_component);
20513        if matches!(version, MavlinkVersion::V2) {
20514            __tmp.put_u8(self.mission_type as u8);
20515            let len = __tmp.len();
20516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20517        } else {
20518            __tmp.len()
20519        }
20520    }
20521}
20522#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20523#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20524#[doc = ""]
20525#[doc = "ID: 41"]
20526#[derive(Debug, Clone, PartialEq)]
20527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20529#[cfg_attr(feature = "ts", derive(TS))]
20530#[cfg_attr(feature = "ts", ts(export))]
20531pub struct MISSION_SET_CURRENT_DATA {
20532    #[doc = "Sequence"]
20533    pub seq: u16,
20534    #[doc = "System ID"]
20535    pub target_system: u8,
20536    #[doc = "Component ID"]
20537    pub target_component: u8,
20538}
20539impl MISSION_SET_CURRENT_DATA {
20540    pub const ENCODED_LEN: usize = 4usize;
20541    pub const DEFAULT: Self = Self {
20542        seq: 0_u16,
20543        target_system: 0_u8,
20544        target_component: 0_u8,
20545    };
20546    #[cfg(feature = "arbitrary")]
20547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20548        use arbitrary::{Arbitrary, Unstructured};
20549        let mut buf = [0u8; 1024];
20550        rng.fill_bytes(&mut buf);
20551        let mut unstructured = Unstructured::new(&buf);
20552        Self::arbitrary(&mut unstructured).unwrap_or_default()
20553    }
20554}
20555impl Default for MISSION_SET_CURRENT_DATA {
20556    fn default() -> Self {
20557        Self::DEFAULT.clone()
20558    }
20559}
20560impl MessageData for MISSION_SET_CURRENT_DATA {
20561    type Message = MavMessage;
20562    const ID: u32 = 41u32;
20563    const NAME: &'static str = "MISSION_SET_CURRENT";
20564    const EXTRA_CRC: u8 = 28u8;
20565    const ENCODED_LEN: usize = 4usize;
20566    fn deser(
20567        _version: MavlinkVersion,
20568        __input: &[u8],
20569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20570        let avail_len = __input.len();
20571        let mut payload_buf = [0; Self::ENCODED_LEN];
20572        let mut buf = if avail_len < Self::ENCODED_LEN {
20573            payload_buf[0..avail_len].copy_from_slice(__input);
20574            Bytes::new(&payload_buf)
20575        } else {
20576            Bytes::new(__input)
20577        };
20578        let mut __struct = Self::default();
20579        __struct.seq = buf.get_u16_le();
20580        __struct.target_system = buf.get_u8();
20581        __struct.target_component = buf.get_u8();
20582        Ok(__struct)
20583    }
20584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20585        let mut __tmp = BytesMut::new(bytes);
20586        #[allow(clippy::absurd_extreme_comparisons)]
20587        #[allow(unused_comparisons)]
20588        if __tmp.remaining() < Self::ENCODED_LEN {
20589            panic!(
20590                "buffer is too small (need {} bytes, but got {})",
20591                Self::ENCODED_LEN,
20592                __tmp.remaining(),
20593            )
20594        }
20595        __tmp.put_u16_le(self.seq);
20596        __tmp.put_u8(self.target_system);
20597        __tmp.put_u8(self.target_component);
20598        if matches!(version, MavlinkVersion::V2) {
20599            let len = __tmp.len();
20600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20601        } else {
20602            __tmp.len()
20603        }
20604    }
20605}
20606#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20607#[doc = ""]
20608#[doc = "ID: 38"]
20609#[derive(Debug, Clone, PartialEq)]
20610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20612#[cfg_attr(feature = "ts", derive(TS))]
20613#[cfg_attr(feature = "ts", ts(export))]
20614pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20615    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20616    pub start_index: i16,
20617    #[doc = "End index, equal or greater than start index."]
20618    pub end_index: i16,
20619    #[doc = "System ID"]
20620    pub target_system: u8,
20621    #[doc = "Component ID"]
20622    pub target_component: u8,
20623    #[doc = "Mission type."]
20624    #[cfg_attr(feature = "serde", serde(default))]
20625    pub mission_type: MavMissionType,
20626}
20627impl MISSION_WRITE_PARTIAL_LIST_DATA {
20628    pub const ENCODED_LEN: usize = 7usize;
20629    pub const DEFAULT: Self = Self {
20630        start_index: 0_i16,
20631        end_index: 0_i16,
20632        target_system: 0_u8,
20633        target_component: 0_u8,
20634        mission_type: MavMissionType::DEFAULT,
20635    };
20636    #[cfg(feature = "arbitrary")]
20637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20638        use arbitrary::{Arbitrary, Unstructured};
20639        let mut buf = [0u8; 1024];
20640        rng.fill_bytes(&mut buf);
20641        let mut unstructured = Unstructured::new(&buf);
20642        Self::arbitrary(&mut unstructured).unwrap_or_default()
20643    }
20644}
20645impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20646    fn default() -> Self {
20647        Self::DEFAULT.clone()
20648    }
20649}
20650impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20651    type Message = MavMessage;
20652    const ID: u32 = 38u32;
20653    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20654    const EXTRA_CRC: u8 = 9u8;
20655    const ENCODED_LEN: usize = 7usize;
20656    fn deser(
20657        _version: MavlinkVersion,
20658        __input: &[u8],
20659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20660        let avail_len = __input.len();
20661        let mut payload_buf = [0; Self::ENCODED_LEN];
20662        let mut buf = if avail_len < Self::ENCODED_LEN {
20663            payload_buf[0..avail_len].copy_from_slice(__input);
20664            Bytes::new(&payload_buf)
20665        } else {
20666            Bytes::new(__input)
20667        };
20668        let mut __struct = Self::default();
20669        __struct.start_index = buf.get_i16_le();
20670        __struct.end_index = buf.get_i16_le();
20671        __struct.target_system = buf.get_u8();
20672        __struct.target_component = buf.get_u8();
20673        let tmp = buf.get_u8();
20674        __struct.mission_type =
20675            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20676                enum_type: "MavMissionType",
20677                value: tmp as u32,
20678            })?;
20679        Ok(__struct)
20680    }
20681    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20682        let mut __tmp = BytesMut::new(bytes);
20683        #[allow(clippy::absurd_extreme_comparisons)]
20684        #[allow(unused_comparisons)]
20685        if __tmp.remaining() < Self::ENCODED_LEN {
20686            panic!(
20687                "buffer is too small (need {} bytes, but got {})",
20688                Self::ENCODED_LEN,
20689                __tmp.remaining(),
20690            )
20691        }
20692        __tmp.put_i16_le(self.start_index);
20693        __tmp.put_i16_le(self.end_index);
20694        __tmp.put_u8(self.target_system);
20695        __tmp.put_u8(self.target_component);
20696        if matches!(version, MavlinkVersion::V2) {
20697            __tmp.put_u8(self.mission_type as u8);
20698            let len = __tmp.len();
20699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20700        } else {
20701            __tmp.len()
20702        }
20703    }
20704}
20705#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20706#[doc = "Orientation of a mount."]
20707#[doc = ""]
20708#[doc = "ID: 265"]
20709#[derive(Debug, Clone, PartialEq)]
20710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20712#[cfg_attr(feature = "ts", derive(TS))]
20713#[cfg_attr(feature = "ts", ts(export))]
20714pub struct MOUNT_ORIENTATION_DATA {
20715    #[doc = "Timestamp (time since system boot)."]
20716    pub time_boot_ms: u32,
20717    #[doc = "Roll in global frame (set to NaN for invalid)."]
20718    pub roll: f32,
20719    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20720    pub pitch: f32,
20721    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20722    pub yaw: f32,
20723    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20725    pub yaw_absolute: f32,
20726}
20727impl MOUNT_ORIENTATION_DATA {
20728    pub const ENCODED_LEN: usize = 20usize;
20729    pub const DEFAULT: Self = Self {
20730        time_boot_ms: 0_u32,
20731        roll: 0.0_f32,
20732        pitch: 0.0_f32,
20733        yaw: 0.0_f32,
20734        yaw_absolute: 0.0_f32,
20735    };
20736    #[cfg(feature = "arbitrary")]
20737    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20738        use arbitrary::{Arbitrary, Unstructured};
20739        let mut buf = [0u8; 1024];
20740        rng.fill_bytes(&mut buf);
20741        let mut unstructured = Unstructured::new(&buf);
20742        Self::arbitrary(&mut unstructured).unwrap_or_default()
20743    }
20744}
20745impl Default for MOUNT_ORIENTATION_DATA {
20746    fn default() -> Self {
20747        Self::DEFAULT.clone()
20748    }
20749}
20750impl MessageData for MOUNT_ORIENTATION_DATA {
20751    type Message = MavMessage;
20752    const ID: u32 = 265u32;
20753    const NAME: &'static str = "MOUNT_ORIENTATION";
20754    const EXTRA_CRC: u8 = 26u8;
20755    const ENCODED_LEN: usize = 20usize;
20756    fn deser(
20757        _version: MavlinkVersion,
20758        __input: &[u8],
20759    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20760        let avail_len = __input.len();
20761        let mut payload_buf = [0; Self::ENCODED_LEN];
20762        let mut buf = if avail_len < Self::ENCODED_LEN {
20763            payload_buf[0..avail_len].copy_from_slice(__input);
20764            Bytes::new(&payload_buf)
20765        } else {
20766            Bytes::new(__input)
20767        };
20768        let mut __struct = Self::default();
20769        __struct.time_boot_ms = buf.get_u32_le();
20770        __struct.roll = buf.get_f32_le();
20771        __struct.pitch = buf.get_f32_le();
20772        __struct.yaw = buf.get_f32_le();
20773        __struct.yaw_absolute = buf.get_f32_le();
20774        Ok(__struct)
20775    }
20776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20777        let mut __tmp = BytesMut::new(bytes);
20778        #[allow(clippy::absurd_extreme_comparisons)]
20779        #[allow(unused_comparisons)]
20780        if __tmp.remaining() < Self::ENCODED_LEN {
20781            panic!(
20782                "buffer is too small (need {} bytes, but got {})",
20783                Self::ENCODED_LEN,
20784                __tmp.remaining(),
20785            )
20786        }
20787        __tmp.put_u32_le(self.time_boot_ms);
20788        __tmp.put_f32_le(self.roll);
20789        __tmp.put_f32_le(self.pitch);
20790        __tmp.put_f32_le(self.yaw);
20791        if matches!(version, MavlinkVersion::V2) {
20792            __tmp.put_f32_le(self.yaw_absolute);
20793            let len = __tmp.len();
20794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20795        } else {
20796            __tmp.len()
20797        }
20798    }
20799}
20800#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20801#[doc = ""]
20802#[doc = "ID: 251"]
20803#[derive(Debug, Clone, PartialEq)]
20804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20806#[cfg_attr(feature = "ts", derive(TS))]
20807#[cfg_attr(feature = "ts", ts(export))]
20808pub struct NAMED_VALUE_FLOAT_DATA {
20809    #[doc = "Timestamp (time since system boot)."]
20810    pub time_boot_ms: u32,
20811    #[doc = "Floating point value"]
20812    pub value: f32,
20813    #[doc = "Name of the debug variable"]
20814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20815    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20816    pub name: [u8; 10],
20817}
20818impl NAMED_VALUE_FLOAT_DATA {
20819    pub const ENCODED_LEN: usize = 18usize;
20820    pub const DEFAULT: Self = Self {
20821        time_boot_ms: 0_u32,
20822        value: 0.0_f32,
20823        name: [0_u8; 10usize],
20824    };
20825    #[cfg(feature = "arbitrary")]
20826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20827        use arbitrary::{Arbitrary, Unstructured};
20828        let mut buf = [0u8; 1024];
20829        rng.fill_bytes(&mut buf);
20830        let mut unstructured = Unstructured::new(&buf);
20831        Self::arbitrary(&mut unstructured).unwrap_or_default()
20832    }
20833}
20834impl Default for NAMED_VALUE_FLOAT_DATA {
20835    fn default() -> Self {
20836        Self::DEFAULT.clone()
20837    }
20838}
20839impl MessageData for NAMED_VALUE_FLOAT_DATA {
20840    type Message = MavMessage;
20841    const ID: u32 = 251u32;
20842    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20843    const EXTRA_CRC: u8 = 170u8;
20844    const ENCODED_LEN: usize = 18usize;
20845    fn deser(
20846        _version: MavlinkVersion,
20847        __input: &[u8],
20848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20849        let avail_len = __input.len();
20850        let mut payload_buf = [0; Self::ENCODED_LEN];
20851        let mut buf = if avail_len < Self::ENCODED_LEN {
20852            payload_buf[0..avail_len].copy_from_slice(__input);
20853            Bytes::new(&payload_buf)
20854        } else {
20855            Bytes::new(__input)
20856        };
20857        let mut __struct = Self::default();
20858        __struct.time_boot_ms = buf.get_u32_le();
20859        __struct.value = buf.get_f32_le();
20860        for v in &mut __struct.name {
20861            let val = buf.get_u8();
20862            *v = val;
20863        }
20864        Ok(__struct)
20865    }
20866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20867        let mut __tmp = BytesMut::new(bytes);
20868        #[allow(clippy::absurd_extreme_comparisons)]
20869        #[allow(unused_comparisons)]
20870        if __tmp.remaining() < Self::ENCODED_LEN {
20871            panic!(
20872                "buffer is too small (need {} bytes, but got {})",
20873                Self::ENCODED_LEN,
20874                __tmp.remaining(),
20875            )
20876        }
20877        __tmp.put_u32_le(self.time_boot_ms);
20878        __tmp.put_f32_le(self.value);
20879        for val in &self.name {
20880            __tmp.put_u8(*val);
20881        }
20882        if matches!(version, MavlinkVersion::V2) {
20883            let len = __tmp.len();
20884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20885        } else {
20886            __tmp.len()
20887        }
20888    }
20889}
20890#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20891#[doc = ""]
20892#[doc = "ID: 252"]
20893#[derive(Debug, Clone, PartialEq)]
20894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20896#[cfg_attr(feature = "ts", derive(TS))]
20897#[cfg_attr(feature = "ts", ts(export))]
20898pub struct NAMED_VALUE_INT_DATA {
20899    #[doc = "Timestamp (time since system boot)."]
20900    pub time_boot_ms: u32,
20901    #[doc = "Signed integer value"]
20902    pub value: i32,
20903    #[doc = "Name of the debug variable"]
20904    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20905    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20906    pub name: [u8; 10],
20907}
20908impl NAMED_VALUE_INT_DATA {
20909    pub const ENCODED_LEN: usize = 18usize;
20910    pub const DEFAULT: Self = Self {
20911        time_boot_ms: 0_u32,
20912        value: 0_i32,
20913        name: [0_u8; 10usize],
20914    };
20915    #[cfg(feature = "arbitrary")]
20916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20917        use arbitrary::{Arbitrary, Unstructured};
20918        let mut buf = [0u8; 1024];
20919        rng.fill_bytes(&mut buf);
20920        let mut unstructured = Unstructured::new(&buf);
20921        Self::arbitrary(&mut unstructured).unwrap_or_default()
20922    }
20923}
20924impl Default for NAMED_VALUE_INT_DATA {
20925    fn default() -> Self {
20926        Self::DEFAULT.clone()
20927    }
20928}
20929impl MessageData for NAMED_VALUE_INT_DATA {
20930    type Message = MavMessage;
20931    const ID: u32 = 252u32;
20932    const NAME: &'static str = "NAMED_VALUE_INT";
20933    const EXTRA_CRC: u8 = 44u8;
20934    const ENCODED_LEN: usize = 18usize;
20935    fn deser(
20936        _version: MavlinkVersion,
20937        __input: &[u8],
20938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20939        let avail_len = __input.len();
20940        let mut payload_buf = [0; Self::ENCODED_LEN];
20941        let mut buf = if avail_len < Self::ENCODED_LEN {
20942            payload_buf[0..avail_len].copy_from_slice(__input);
20943            Bytes::new(&payload_buf)
20944        } else {
20945            Bytes::new(__input)
20946        };
20947        let mut __struct = Self::default();
20948        __struct.time_boot_ms = buf.get_u32_le();
20949        __struct.value = buf.get_i32_le();
20950        for v in &mut __struct.name {
20951            let val = buf.get_u8();
20952            *v = val;
20953        }
20954        Ok(__struct)
20955    }
20956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20957        let mut __tmp = BytesMut::new(bytes);
20958        #[allow(clippy::absurd_extreme_comparisons)]
20959        #[allow(unused_comparisons)]
20960        if __tmp.remaining() < Self::ENCODED_LEN {
20961            panic!(
20962                "buffer is too small (need {} bytes, but got {})",
20963                Self::ENCODED_LEN,
20964                __tmp.remaining(),
20965            )
20966        }
20967        __tmp.put_u32_le(self.time_boot_ms);
20968        __tmp.put_i32_le(self.value);
20969        for val in &self.name {
20970            __tmp.put_u8(*val);
20971        }
20972        if matches!(version, MavlinkVersion::V2) {
20973            let len = __tmp.len();
20974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20975        } else {
20976            __tmp.len()
20977        }
20978    }
20979}
20980#[doc = "The state of the navigation and position controller."]
20981#[doc = ""]
20982#[doc = "ID: 62"]
20983#[derive(Debug, Clone, PartialEq)]
20984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20986#[cfg_attr(feature = "ts", derive(TS))]
20987#[cfg_attr(feature = "ts", ts(export))]
20988pub struct NAV_CONTROLLER_OUTPUT_DATA {
20989    #[doc = "Current desired roll"]
20990    pub nav_roll: f32,
20991    #[doc = "Current desired pitch"]
20992    pub nav_pitch: f32,
20993    #[doc = "Current altitude error"]
20994    pub alt_error: f32,
20995    #[doc = "Current airspeed error"]
20996    pub aspd_error: f32,
20997    #[doc = "Current crosstrack error on x-y plane"]
20998    pub xtrack_error: f32,
20999    #[doc = "Current desired heading"]
21000    pub nav_bearing: i16,
21001    #[doc = "Bearing to current waypoint/target"]
21002    pub target_bearing: i16,
21003    #[doc = "Distance to active waypoint"]
21004    pub wp_dist: u16,
21005}
21006impl NAV_CONTROLLER_OUTPUT_DATA {
21007    pub const ENCODED_LEN: usize = 26usize;
21008    pub const DEFAULT: Self = Self {
21009        nav_roll: 0.0_f32,
21010        nav_pitch: 0.0_f32,
21011        alt_error: 0.0_f32,
21012        aspd_error: 0.0_f32,
21013        xtrack_error: 0.0_f32,
21014        nav_bearing: 0_i16,
21015        target_bearing: 0_i16,
21016        wp_dist: 0_u16,
21017    };
21018    #[cfg(feature = "arbitrary")]
21019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21020        use arbitrary::{Arbitrary, Unstructured};
21021        let mut buf = [0u8; 1024];
21022        rng.fill_bytes(&mut buf);
21023        let mut unstructured = Unstructured::new(&buf);
21024        Self::arbitrary(&mut unstructured).unwrap_or_default()
21025    }
21026}
21027impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21028    fn default() -> Self {
21029        Self::DEFAULT.clone()
21030    }
21031}
21032impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21033    type Message = MavMessage;
21034    const ID: u32 = 62u32;
21035    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21036    const EXTRA_CRC: u8 = 183u8;
21037    const ENCODED_LEN: usize = 26usize;
21038    fn deser(
21039        _version: MavlinkVersion,
21040        __input: &[u8],
21041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21042        let avail_len = __input.len();
21043        let mut payload_buf = [0; Self::ENCODED_LEN];
21044        let mut buf = if avail_len < Self::ENCODED_LEN {
21045            payload_buf[0..avail_len].copy_from_slice(__input);
21046            Bytes::new(&payload_buf)
21047        } else {
21048            Bytes::new(__input)
21049        };
21050        let mut __struct = Self::default();
21051        __struct.nav_roll = buf.get_f32_le();
21052        __struct.nav_pitch = buf.get_f32_le();
21053        __struct.alt_error = buf.get_f32_le();
21054        __struct.aspd_error = buf.get_f32_le();
21055        __struct.xtrack_error = buf.get_f32_le();
21056        __struct.nav_bearing = buf.get_i16_le();
21057        __struct.target_bearing = buf.get_i16_le();
21058        __struct.wp_dist = buf.get_u16_le();
21059        Ok(__struct)
21060    }
21061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21062        let mut __tmp = BytesMut::new(bytes);
21063        #[allow(clippy::absurd_extreme_comparisons)]
21064        #[allow(unused_comparisons)]
21065        if __tmp.remaining() < Self::ENCODED_LEN {
21066            panic!(
21067                "buffer is too small (need {} bytes, but got {})",
21068                Self::ENCODED_LEN,
21069                __tmp.remaining(),
21070            )
21071        }
21072        __tmp.put_f32_le(self.nav_roll);
21073        __tmp.put_f32_le(self.nav_pitch);
21074        __tmp.put_f32_le(self.alt_error);
21075        __tmp.put_f32_le(self.aspd_error);
21076        __tmp.put_f32_le(self.xtrack_error);
21077        __tmp.put_i16_le(self.nav_bearing);
21078        __tmp.put_i16_le(self.target_bearing);
21079        __tmp.put_u16_le(self.wp_dist);
21080        if matches!(version, MavlinkVersion::V2) {
21081            let len = __tmp.len();
21082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21083        } else {
21084            __tmp.len()
21085        }
21086    }
21087}
21088#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21089#[doc = ""]
21090#[doc = "ID: 330"]
21091#[derive(Debug, Clone, PartialEq)]
21092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21094#[cfg_attr(feature = "ts", derive(TS))]
21095#[cfg_attr(feature = "ts", ts(export))]
21096pub struct OBSTACLE_DISTANCE_DATA {
21097    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21098    pub time_usec: u64,
21099    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21100    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21101    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21102    pub distances: [u16; 72],
21103    #[doc = "Minimum distance the sensor can measure."]
21104    pub min_distance: u16,
21105    #[doc = "Maximum distance the sensor can measure."]
21106    pub max_distance: u16,
21107    #[doc = "Class id of the distance sensor type."]
21108    pub sensor_type: MavDistanceSensor,
21109    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21110    pub increment: u8,
21111    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21113    pub increment_f: f32,
21114    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21116    pub angle_offset: f32,
21117    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21118    #[cfg_attr(feature = "serde", serde(default))]
21119    pub frame: MavFrame,
21120}
21121impl OBSTACLE_DISTANCE_DATA {
21122    pub const ENCODED_LEN: usize = 167usize;
21123    pub const DEFAULT: Self = Self {
21124        time_usec: 0_u64,
21125        distances: [0_u16; 72usize],
21126        min_distance: 0_u16,
21127        max_distance: 0_u16,
21128        sensor_type: MavDistanceSensor::DEFAULT,
21129        increment: 0_u8,
21130        increment_f: 0.0_f32,
21131        angle_offset: 0.0_f32,
21132        frame: MavFrame::DEFAULT,
21133    };
21134    #[cfg(feature = "arbitrary")]
21135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21136        use arbitrary::{Arbitrary, Unstructured};
21137        let mut buf = [0u8; 1024];
21138        rng.fill_bytes(&mut buf);
21139        let mut unstructured = Unstructured::new(&buf);
21140        Self::arbitrary(&mut unstructured).unwrap_or_default()
21141    }
21142}
21143impl Default for OBSTACLE_DISTANCE_DATA {
21144    fn default() -> Self {
21145        Self::DEFAULT.clone()
21146    }
21147}
21148impl MessageData for OBSTACLE_DISTANCE_DATA {
21149    type Message = MavMessage;
21150    const ID: u32 = 330u32;
21151    const NAME: &'static str = "OBSTACLE_DISTANCE";
21152    const EXTRA_CRC: u8 = 23u8;
21153    const ENCODED_LEN: usize = 167usize;
21154    fn deser(
21155        _version: MavlinkVersion,
21156        __input: &[u8],
21157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21158        let avail_len = __input.len();
21159        let mut payload_buf = [0; Self::ENCODED_LEN];
21160        let mut buf = if avail_len < Self::ENCODED_LEN {
21161            payload_buf[0..avail_len].copy_from_slice(__input);
21162            Bytes::new(&payload_buf)
21163        } else {
21164            Bytes::new(__input)
21165        };
21166        let mut __struct = Self::default();
21167        __struct.time_usec = buf.get_u64_le();
21168        for v in &mut __struct.distances {
21169            let val = buf.get_u16_le();
21170            *v = val;
21171        }
21172        __struct.min_distance = buf.get_u16_le();
21173        __struct.max_distance = buf.get_u16_le();
21174        let tmp = buf.get_u8();
21175        __struct.sensor_type =
21176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21177                enum_type: "MavDistanceSensor",
21178                value: tmp as u32,
21179            })?;
21180        __struct.increment = buf.get_u8();
21181        __struct.increment_f = buf.get_f32_le();
21182        __struct.angle_offset = buf.get_f32_le();
21183        let tmp = buf.get_u8();
21184        __struct.frame =
21185            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21186                enum_type: "MavFrame",
21187                value: tmp as u32,
21188            })?;
21189        Ok(__struct)
21190    }
21191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21192        let mut __tmp = BytesMut::new(bytes);
21193        #[allow(clippy::absurd_extreme_comparisons)]
21194        #[allow(unused_comparisons)]
21195        if __tmp.remaining() < Self::ENCODED_LEN {
21196            panic!(
21197                "buffer is too small (need {} bytes, but got {})",
21198                Self::ENCODED_LEN,
21199                __tmp.remaining(),
21200            )
21201        }
21202        __tmp.put_u64_le(self.time_usec);
21203        for val in &self.distances {
21204            __tmp.put_u16_le(*val);
21205        }
21206        __tmp.put_u16_le(self.min_distance);
21207        __tmp.put_u16_le(self.max_distance);
21208        __tmp.put_u8(self.sensor_type as u8);
21209        __tmp.put_u8(self.increment);
21210        if matches!(version, MavlinkVersion::V2) {
21211            __tmp.put_f32_le(self.increment_f);
21212            __tmp.put_f32_le(self.angle_offset);
21213            __tmp.put_u8(self.frame as u8);
21214            let len = __tmp.len();
21215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21216        } else {
21217            __tmp.len()
21218        }
21219    }
21220}
21221#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21222#[doc = ""]
21223#[doc = "ID: 331"]
21224#[derive(Debug, Clone, PartialEq)]
21225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21227#[cfg_attr(feature = "ts", derive(TS))]
21228#[cfg_attr(feature = "ts", ts(export))]
21229pub struct ODOMETRY_DATA {
21230    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21231    pub time_usec: u64,
21232    #[doc = "X Position"]
21233    pub x: f32,
21234    #[doc = "Y Position"]
21235    pub y: f32,
21236    #[doc = "Z Position"]
21237    pub z: f32,
21238    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21240    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21241    pub q: [f32; 4],
21242    #[doc = "X linear speed"]
21243    pub vx: f32,
21244    #[doc = "Y linear speed"]
21245    pub vy: f32,
21246    #[doc = "Z linear speed"]
21247    pub vz: f32,
21248    #[doc = "Roll angular speed"]
21249    pub rollspeed: f32,
21250    #[doc = "Pitch angular speed"]
21251    pub pitchspeed: f32,
21252    #[doc = "Yaw angular speed"]
21253    pub yawspeed: f32,
21254    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21257    pub pose_covariance: [f32; 21],
21258    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21261    pub velocity_covariance: [f32; 21],
21262    #[doc = "Coordinate frame of reference for the pose data."]
21263    pub frame_id: MavFrame,
21264    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21265    pub child_frame_id: MavFrame,
21266    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21268    pub reset_counter: u8,
21269    #[doc = "Type of estimator that is providing the odometry."]
21270    #[cfg_attr(feature = "serde", serde(default))]
21271    pub estimator_type: MavEstimatorType,
21272    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21273    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21274    pub quality: i8,
21275}
21276impl ODOMETRY_DATA {
21277    pub const ENCODED_LEN: usize = 233usize;
21278    pub const DEFAULT: Self = Self {
21279        time_usec: 0_u64,
21280        x: 0.0_f32,
21281        y: 0.0_f32,
21282        z: 0.0_f32,
21283        q: [0.0_f32; 4usize],
21284        vx: 0.0_f32,
21285        vy: 0.0_f32,
21286        vz: 0.0_f32,
21287        rollspeed: 0.0_f32,
21288        pitchspeed: 0.0_f32,
21289        yawspeed: 0.0_f32,
21290        pose_covariance: [0.0_f32; 21usize],
21291        velocity_covariance: [0.0_f32; 21usize],
21292        frame_id: MavFrame::DEFAULT,
21293        child_frame_id: MavFrame::DEFAULT,
21294        reset_counter: 0_u8,
21295        estimator_type: MavEstimatorType::DEFAULT,
21296        quality: 0_i8,
21297    };
21298    #[cfg(feature = "arbitrary")]
21299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21300        use arbitrary::{Arbitrary, Unstructured};
21301        let mut buf = [0u8; 1024];
21302        rng.fill_bytes(&mut buf);
21303        let mut unstructured = Unstructured::new(&buf);
21304        Self::arbitrary(&mut unstructured).unwrap_or_default()
21305    }
21306}
21307impl Default for ODOMETRY_DATA {
21308    fn default() -> Self {
21309        Self::DEFAULT.clone()
21310    }
21311}
21312impl MessageData for ODOMETRY_DATA {
21313    type Message = MavMessage;
21314    const ID: u32 = 331u32;
21315    const NAME: &'static str = "ODOMETRY";
21316    const EXTRA_CRC: u8 = 91u8;
21317    const ENCODED_LEN: usize = 233usize;
21318    fn deser(
21319        _version: MavlinkVersion,
21320        __input: &[u8],
21321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21322        let avail_len = __input.len();
21323        let mut payload_buf = [0; Self::ENCODED_LEN];
21324        let mut buf = if avail_len < Self::ENCODED_LEN {
21325            payload_buf[0..avail_len].copy_from_slice(__input);
21326            Bytes::new(&payload_buf)
21327        } else {
21328            Bytes::new(__input)
21329        };
21330        let mut __struct = Self::default();
21331        __struct.time_usec = buf.get_u64_le();
21332        __struct.x = buf.get_f32_le();
21333        __struct.y = buf.get_f32_le();
21334        __struct.z = buf.get_f32_le();
21335        for v in &mut __struct.q {
21336            let val = buf.get_f32_le();
21337            *v = val;
21338        }
21339        __struct.vx = buf.get_f32_le();
21340        __struct.vy = buf.get_f32_le();
21341        __struct.vz = buf.get_f32_le();
21342        __struct.rollspeed = buf.get_f32_le();
21343        __struct.pitchspeed = buf.get_f32_le();
21344        __struct.yawspeed = buf.get_f32_le();
21345        for v in &mut __struct.pose_covariance {
21346            let val = buf.get_f32_le();
21347            *v = val;
21348        }
21349        for v in &mut __struct.velocity_covariance {
21350            let val = buf.get_f32_le();
21351            *v = val;
21352        }
21353        let tmp = buf.get_u8();
21354        __struct.frame_id =
21355            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21356                enum_type: "MavFrame",
21357                value: tmp as u32,
21358            })?;
21359        let tmp = buf.get_u8();
21360        __struct.child_frame_id =
21361            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21362                enum_type: "MavFrame",
21363                value: tmp as u32,
21364            })?;
21365        __struct.reset_counter = buf.get_u8();
21366        let tmp = buf.get_u8();
21367        __struct.estimator_type =
21368            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21369                enum_type: "MavEstimatorType",
21370                value: tmp as u32,
21371            })?;
21372        __struct.quality = buf.get_i8();
21373        Ok(__struct)
21374    }
21375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21376        let mut __tmp = BytesMut::new(bytes);
21377        #[allow(clippy::absurd_extreme_comparisons)]
21378        #[allow(unused_comparisons)]
21379        if __tmp.remaining() < Self::ENCODED_LEN {
21380            panic!(
21381                "buffer is too small (need {} bytes, but got {})",
21382                Self::ENCODED_LEN,
21383                __tmp.remaining(),
21384            )
21385        }
21386        __tmp.put_u64_le(self.time_usec);
21387        __tmp.put_f32_le(self.x);
21388        __tmp.put_f32_le(self.y);
21389        __tmp.put_f32_le(self.z);
21390        for val in &self.q {
21391            __tmp.put_f32_le(*val);
21392        }
21393        __tmp.put_f32_le(self.vx);
21394        __tmp.put_f32_le(self.vy);
21395        __tmp.put_f32_le(self.vz);
21396        __tmp.put_f32_le(self.rollspeed);
21397        __tmp.put_f32_le(self.pitchspeed);
21398        __tmp.put_f32_le(self.yawspeed);
21399        for val in &self.pose_covariance {
21400            __tmp.put_f32_le(*val);
21401        }
21402        for val in &self.velocity_covariance {
21403            __tmp.put_f32_le(*val);
21404        }
21405        __tmp.put_u8(self.frame_id as u8);
21406        __tmp.put_u8(self.child_frame_id as u8);
21407        if matches!(version, MavlinkVersion::V2) {
21408            __tmp.put_u8(self.reset_counter);
21409            __tmp.put_u8(self.estimator_type as u8);
21410            __tmp.put_i8(self.quality);
21411            let len = __tmp.len();
21412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21413        } else {
21414            __tmp.len()
21415        }
21416    }
21417}
21418#[doc = "Hardware status sent by an onboard computer."]
21419#[doc = ""]
21420#[doc = "ID: 390"]
21421#[derive(Debug, Clone, PartialEq)]
21422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21424#[cfg_attr(feature = "ts", derive(TS))]
21425#[cfg_attr(feature = "ts", ts(export))]
21426pub struct ONBOARD_COMPUTER_STATUS_DATA {
21427    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21428    pub time_usec: u64,
21429    #[doc = "Time since system boot."]
21430    pub uptime: u32,
21431    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21432    pub ram_usage: u32,
21433    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21434    pub ram_total: u32,
21435    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21436    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21437    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21438    pub storage_type: [u32; 4],
21439    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21442    pub storage_usage: [u32; 4],
21443    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21446    pub storage_total: [u32; 4],
21447    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21450    pub link_type: [u32; 6],
21451    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21454    pub link_tx_rate: [u32; 6],
21455    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21458    pub link_rx_rate: [u32; 6],
21459    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21461    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21462    pub link_tx_max: [u32; 6],
21463    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21466    pub link_rx_max: [u32; 6],
21467    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21470    pub fan_speed: [i16; 4],
21471    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21472    pub mavtype: u8,
21473    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21475    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21476    pub cpu_cores: [u8; 8],
21477    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21479    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21480    pub cpu_combined: [u8; 10],
21481    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21483    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21484    pub gpu_cores: [u8; 4],
21485    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21487    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21488    pub gpu_combined: [u8; 10],
21489    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21490    pub temperature_board: i8,
21491    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21493    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21494    pub temperature_core: [i8; 8],
21495}
21496impl ONBOARD_COMPUTER_STATUS_DATA {
21497    pub const ENCODED_LEN: usize = 238usize;
21498    pub const DEFAULT: Self = Self {
21499        time_usec: 0_u64,
21500        uptime: 0_u32,
21501        ram_usage: 0_u32,
21502        ram_total: 0_u32,
21503        storage_type: [0_u32; 4usize],
21504        storage_usage: [0_u32; 4usize],
21505        storage_total: [0_u32; 4usize],
21506        link_type: [0_u32; 6usize],
21507        link_tx_rate: [0_u32; 6usize],
21508        link_rx_rate: [0_u32; 6usize],
21509        link_tx_max: [0_u32; 6usize],
21510        link_rx_max: [0_u32; 6usize],
21511        fan_speed: [0_i16; 4usize],
21512        mavtype: 0_u8,
21513        cpu_cores: [0_u8; 8usize],
21514        cpu_combined: [0_u8; 10usize],
21515        gpu_cores: [0_u8; 4usize],
21516        gpu_combined: [0_u8; 10usize],
21517        temperature_board: 0_i8,
21518        temperature_core: [0_i8; 8usize],
21519    };
21520    #[cfg(feature = "arbitrary")]
21521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21522        use arbitrary::{Arbitrary, Unstructured};
21523        let mut buf = [0u8; 1024];
21524        rng.fill_bytes(&mut buf);
21525        let mut unstructured = Unstructured::new(&buf);
21526        Self::arbitrary(&mut unstructured).unwrap_or_default()
21527    }
21528}
21529impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21530    fn default() -> Self {
21531        Self::DEFAULT.clone()
21532    }
21533}
21534impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21535    type Message = MavMessage;
21536    const ID: u32 = 390u32;
21537    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21538    const EXTRA_CRC: u8 = 156u8;
21539    const ENCODED_LEN: usize = 238usize;
21540    fn deser(
21541        _version: MavlinkVersion,
21542        __input: &[u8],
21543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21544        let avail_len = __input.len();
21545        let mut payload_buf = [0; Self::ENCODED_LEN];
21546        let mut buf = if avail_len < Self::ENCODED_LEN {
21547            payload_buf[0..avail_len].copy_from_slice(__input);
21548            Bytes::new(&payload_buf)
21549        } else {
21550            Bytes::new(__input)
21551        };
21552        let mut __struct = Self::default();
21553        __struct.time_usec = buf.get_u64_le();
21554        __struct.uptime = buf.get_u32_le();
21555        __struct.ram_usage = buf.get_u32_le();
21556        __struct.ram_total = buf.get_u32_le();
21557        for v in &mut __struct.storage_type {
21558            let val = buf.get_u32_le();
21559            *v = val;
21560        }
21561        for v in &mut __struct.storage_usage {
21562            let val = buf.get_u32_le();
21563            *v = val;
21564        }
21565        for v in &mut __struct.storage_total {
21566            let val = buf.get_u32_le();
21567            *v = val;
21568        }
21569        for v in &mut __struct.link_type {
21570            let val = buf.get_u32_le();
21571            *v = val;
21572        }
21573        for v in &mut __struct.link_tx_rate {
21574            let val = buf.get_u32_le();
21575            *v = val;
21576        }
21577        for v in &mut __struct.link_rx_rate {
21578            let val = buf.get_u32_le();
21579            *v = val;
21580        }
21581        for v in &mut __struct.link_tx_max {
21582            let val = buf.get_u32_le();
21583            *v = val;
21584        }
21585        for v in &mut __struct.link_rx_max {
21586            let val = buf.get_u32_le();
21587            *v = val;
21588        }
21589        for v in &mut __struct.fan_speed {
21590            let val = buf.get_i16_le();
21591            *v = val;
21592        }
21593        __struct.mavtype = buf.get_u8();
21594        for v in &mut __struct.cpu_cores {
21595            let val = buf.get_u8();
21596            *v = val;
21597        }
21598        for v in &mut __struct.cpu_combined {
21599            let val = buf.get_u8();
21600            *v = val;
21601        }
21602        for v in &mut __struct.gpu_cores {
21603            let val = buf.get_u8();
21604            *v = val;
21605        }
21606        for v in &mut __struct.gpu_combined {
21607            let val = buf.get_u8();
21608            *v = val;
21609        }
21610        __struct.temperature_board = buf.get_i8();
21611        for v in &mut __struct.temperature_core {
21612            let val = buf.get_i8();
21613            *v = val;
21614        }
21615        Ok(__struct)
21616    }
21617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21618        let mut __tmp = BytesMut::new(bytes);
21619        #[allow(clippy::absurd_extreme_comparisons)]
21620        #[allow(unused_comparisons)]
21621        if __tmp.remaining() < Self::ENCODED_LEN {
21622            panic!(
21623                "buffer is too small (need {} bytes, but got {})",
21624                Self::ENCODED_LEN,
21625                __tmp.remaining(),
21626            )
21627        }
21628        __tmp.put_u64_le(self.time_usec);
21629        __tmp.put_u32_le(self.uptime);
21630        __tmp.put_u32_le(self.ram_usage);
21631        __tmp.put_u32_le(self.ram_total);
21632        for val in &self.storage_type {
21633            __tmp.put_u32_le(*val);
21634        }
21635        for val in &self.storage_usage {
21636            __tmp.put_u32_le(*val);
21637        }
21638        for val in &self.storage_total {
21639            __tmp.put_u32_le(*val);
21640        }
21641        for val in &self.link_type {
21642            __tmp.put_u32_le(*val);
21643        }
21644        for val in &self.link_tx_rate {
21645            __tmp.put_u32_le(*val);
21646        }
21647        for val in &self.link_rx_rate {
21648            __tmp.put_u32_le(*val);
21649        }
21650        for val in &self.link_tx_max {
21651            __tmp.put_u32_le(*val);
21652        }
21653        for val in &self.link_rx_max {
21654            __tmp.put_u32_le(*val);
21655        }
21656        for val in &self.fan_speed {
21657            __tmp.put_i16_le(*val);
21658        }
21659        __tmp.put_u8(self.mavtype);
21660        for val in &self.cpu_cores {
21661            __tmp.put_u8(*val);
21662        }
21663        for val in &self.cpu_combined {
21664            __tmp.put_u8(*val);
21665        }
21666        for val in &self.gpu_cores {
21667            __tmp.put_u8(*val);
21668        }
21669        for val in &self.gpu_combined {
21670            __tmp.put_u8(*val);
21671        }
21672        __tmp.put_i8(self.temperature_board);
21673        for val in &self.temperature_core {
21674            __tmp.put_i8(*val);
21675        }
21676        if matches!(version, MavlinkVersion::V2) {
21677            let len = __tmp.len();
21678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21679        } else {
21680            __tmp.len()
21681        }
21682    }
21683}
21684#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21685#[doc = ""]
21686#[doc = "ID: 12918"]
21687#[derive(Debug, Clone, PartialEq)]
21688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21690#[cfg_attr(feature = "ts", derive(TS))]
21691#[cfg_attr(feature = "ts", ts(export))]
21692pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21693    #[doc = "Status level indicating if arming is allowed."]
21694    pub status: MavOdidArmStatus,
21695    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21697    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21698    pub error: [u8; 50],
21699}
21700impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21701    pub const ENCODED_LEN: usize = 51usize;
21702    pub const DEFAULT: Self = Self {
21703        status: MavOdidArmStatus::DEFAULT,
21704        error: [0_u8; 50usize],
21705    };
21706    #[cfg(feature = "arbitrary")]
21707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21708        use arbitrary::{Arbitrary, Unstructured};
21709        let mut buf = [0u8; 1024];
21710        rng.fill_bytes(&mut buf);
21711        let mut unstructured = Unstructured::new(&buf);
21712        Self::arbitrary(&mut unstructured).unwrap_or_default()
21713    }
21714}
21715impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21716    fn default() -> Self {
21717        Self::DEFAULT.clone()
21718    }
21719}
21720impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21721    type Message = MavMessage;
21722    const ID: u32 = 12918u32;
21723    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21724    const EXTRA_CRC: u8 = 139u8;
21725    const ENCODED_LEN: usize = 51usize;
21726    fn deser(
21727        _version: MavlinkVersion,
21728        __input: &[u8],
21729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21730        let avail_len = __input.len();
21731        let mut payload_buf = [0; Self::ENCODED_LEN];
21732        let mut buf = if avail_len < Self::ENCODED_LEN {
21733            payload_buf[0..avail_len].copy_from_slice(__input);
21734            Bytes::new(&payload_buf)
21735        } else {
21736            Bytes::new(__input)
21737        };
21738        let mut __struct = Self::default();
21739        let tmp = buf.get_u8();
21740        __struct.status =
21741            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21742                enum_type: "MavOdidArmStatus",
21743                value: tmp as u32,
21744            })?;
21745        for v in &mut __struct.error {
21746            let val = buf.get_u8();
21747            *v = val;
21748        }
21749        Ok(__struct)
21750    }
21751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21752        let mut __tmp = BytesMut::new(bytes);
21753        #[allow(clippy::absurd_extreme_comparisons)]
21754        #[allow(unused_comparisons)]
21755        if __tmp.remaining() < Self::ENCODED_LEN {
21756            panic!(
21757                "buffer is too small (need {} bytes, but got {})",
21758                Self::ENCODED_LEN,
21759                __tmp.remaining(),
21760            )
21761        }
21762        __tmp.put_u8(self.status as u8);
21763        for val in &self.error {
21764            __tmp.put_u8(*val);
21765        }
21766        if matches!(version, MavlinkVersion::V2) {
21767            let len = __tmp.len();
21768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21769        } else {
21770            __tmp.len()
21771        }
21772    }
21773}
21774#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21775#[doc = ""]
21776#[doc = "ID: 12902"]
21777#[derive(Debug, Clone, PartialEq)]
21778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21780#[cfg_attr(feature = "ts", derive(TS))]
21781#[cfg_attr(feature = "ts", ts(export))]
21782pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21783    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21784    pub timestamp: u32,
21785    #[doc = "System ID (0 for broadcast)."]
21786    pub target_system: u8,
21787    #[doc = "Component ID (0 for broadcast)."]
21788    pub target_component: u8,
21789    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21790    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21791    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21792    pub id_or_mac: [u8; 20],
21793    #[doc = "Indicates the type of authentication."]
21794    pub authentication_type: MavOdidAuthType,
21795    #[doc = "Allowed range is 0 - 15."]
21796    pub data_page: u8,
21797    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21798    pub last_page_index: u8,
21799    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21800    pub length: u8,
21801    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21803    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21804    pub authentication_data: [u8; 23],
21805}
21806impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21807    pub const ENCODED_LEN: usize = 53usize;
21808    pub const DEFAULT: Self = Self {
21809        timestamp: 0_u32,
21810        target_system: 0_u8,
21811        target_component: 0_u8,
21812        id_or_mac: [0_u8; 20usize],
21813        authentication_type: MavOdidAuthType::DEFAULT,
21814        data_page: 0_u8,
21815        last_page_index: 0_u8,
21816        length: 0_u8,
21817        authentication_data: [0_u8; 23usize],
21818    };
21819    #[cfg(feature = "arbitrary")]
21820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21821        use arbitrary::{Arbitrary, Unstructured};
21822        let mut buf = [0u8; 1024];
21823        rng.fill_bytes(&mut buf);
21824        let mut unstructured = Unstructured::new(&buf);
21825        Self::arbitrary(&mut unstructured).unwrap_or_default()
21826    }
21827}
21828impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21829    fn default() -> Self {
21830        Self::DEFAULT.clone()
21831    }
21832}
21833impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21834    type Message = MavMessage;
21835    const ID: u32 = 12902u32;
21836    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21837    const EXTRA_CRC: u8 = 140u8;
21838    const ENCODED_LEN: usize = 53usize;
21839    fn deser(
21840        _version: MavlinkVersion,
21841        __input: &[u8],
21842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21843        let avail_len = __input.len();
21844        let mut payload_buf = [0; Self::ENCODED_LEN];
21845        let mut buf = if avail_len < Self::ENCODED_LEN {
21846            payload_buf[0..avail_len].copy_from_slice(__input);
21847            Bytes::new(&payload_buf)
21848        } else {
21849            Bytes::new(__input)
21850        };
21851        let mut __struct = Self::default();
21852        __struct.timestamp = buf.get_u32_le();
21853        __struct.target_system = buf.get_u8();
21854        __struct.target_component = buf.get_u8();
21855        for v in &mut __struct.id_or_mac {
21856            let val = buf.get_u8();
21857            *v = val;
21858        }
21859        let tmp = buf.get_u8();
21860        __struct.authentication_type =
21861            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21862                enum_type: "MavOdidAuthType",
21863                value: tmp as u32,
21864            })?;
21865        __struct.data_page = buf.get_u8();
21866        __struct.last_page_index = buf.get_u8();
21867        __struct.length = buf.get_u8();
21868        for v in &mut __struct.authentication_data {
21869            let val = buf.get_u8();
21870            *v = val;
21871        }
21872        Ok(__struct)
21873    }
21874    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21875        let mut __tmp = BytesMut::new(bytes);
21876        #[allow(clippy::absurd_extreme_comparisons)]
21877        #[allow(unused_comparisons)]
21878        if __tmp.remaining() < Self::ENCODED_LEN {
21879            panic!(
21880                "buffer is too small (need {} bytes, but got {})",
21881                Self::ENCODED_LEN,
21882                __tmp.remaining(),
21883            )
21884        }
21885        __tmp.put_u32_le(self.timestamp);
21886        __tmp.put_u8(self.target_system);
21887        __tmp.put_u8(self.target_component);
21888        for val in &self.id_or_mac {
21889            __tmp.put_u8(*val);
21890        }
21891        __tmp.put_u8(self.authentication_type as u8);
21892        __tmp.put_u8(self.data_page);
21893        __tmp.put_u8(self.last_page_index);
21894        __tmp.put_u8(self.length);
21895        for val in &self.authentication_data {
21896            __tmp.put_u8(*val);
21897        }
21898        if matches!(version, MavlinkVersion::V2) {
21899            let len = __tmp.len();
21900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21901        } else {
21902            __tmp.len()
21903        }
21904    }
21905}
21906#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21907#[doc = ""]
21908#[doc = "ID: 12900"]
21909#[derive(Debug, Clone, PartialEq)]
21910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21912#[cfg_attr(feature = "ts", derive(TS))]
21913#[cfg_attr(feature = "ts", ts(export))]
21914pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21915    #[doc = "System ID (0 for broadcast)."]
21916    pub target_system: u8,
21917    #[doc = "Component ID (0 for broadcast)."]
21918    pub target_component: u8,
21919    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21922    pub id_or_mac: [u8; 20],
21923    #[doc = "Indicates the format for the uas_id field of this message."]
21924    pub id_type: MavOdidIdType,
21925    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21926    pub ua_type: MavOdidUaType,
21927    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21930    pub uas_id: [u8; 20],
21931}
21932impl OPEN_DRONE_ID_BASIC_ID_DATA {
21933    pub const ENCODED_LEN: usize = 44usize;
21934    pub const DEFAULT: Self = Self {
21935        target_system: 0_u8,
21936        target_component: 0_u8,
21937        id_or_mac: [0_u8; 20usize],
21938        id_type: MavOdidIdType::DEFAULT,
21939        ua_type: MavOdidUaType::DEFAULT,
21940        uas_id: [0_u8; 20usize],
21941    };
21942    #[cfg(feature = "arbitrary")]
21943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21944        use arbitrary::{Arbitrary, Unstructured};
21945        let mut buf = [0u8; 1024];
21946        rng.fill_bytes(&mut buf);
21947        let mut unstructured = Unstructured::new(&buf);
21948        Self::arbitrary(&mut unstructured).unwrap_or_default()
21949    }
21950}
21951impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21952    fn default() -> Self {
21953        Self::DEFAULT.clone()
21954    }
21955}
21956impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21957    type Message = MavMessage;
21958    const ID: u32 = 12900u32;
21959    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21960    const EXTRA_CRC: u8 = 114u8;
21961    const ENCODED_LEN: usize = 44usize;
21962    fn deser(
21963        _version: MavlinkVersion,
21964        __input: &[u8],
21965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21966        let avail_len = __input.len();
21967        let mut payload_buf = [0; Self::ENCODED_LEN];
21968        let mut buf = if avail_len < Self::ENCODED_LEN {
21969            payload_buf[0..avail_len].copy_from_slice(__input);
21970            Bytes::new(&payload_buf)
21971        } else {
21972            Bytes::new(__input)
21973        };
21974        let mut __struct = Self::default();
21975        __struct.target_system = buf.get_u8();
21976        __struct.target_component = buf.get_u8();
21977        for v in &mut __struct.id_or_mac {
21978            let val = buf.get_u8();
21979            *v = val;
21980        }
21981        let tmp = buf.get_u8();
21982        __struct.id_type =
21983            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21984                enum_type: "MavOdidIdType",
21985                value: tmp as u32,
21986            })?;
21987        let tmp = buf.get_u8();
21988        __struct.ua_type =
21989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21990                enum_type: "MavOdidUaType",
21991                value: tmp as u32,
21992            })?;
21993        for v in &mut __struct.uas_id {
21994            let val = buf.get_u8();
21995            *v = val;
21996        }
21997        Ok(__struct)
21998    }
21999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22000        let mut __tmp = BytesMut::new(bytes);
22001        #[allow(clippy::absurd_extreme_comparisons)]
22002        #[allow(unused_comparisons)]
22003        if __tmp.remaining() < Self::ENCODED_LEN {
22004            panic!(
22005                "buffer is too small (need {} bytes, but got {})",
22006                Self::ENCODED_LEN,
22007                __tmp.remaining(),
22008            )
22009        }
22010        __tmp.put_u8(self.target_system);
22011        __tmp.put_u8(self.target_component);
22012        for val in &self.id_or_mac {
22013            __tmp.put_u8(*val);
22014        }
22015        __tmp.put_u8(self.id_type as u8);
22016        __tmp.put_u8(self.ua_type as u8);
22017        for val in &self.uas_id {
22018            __tmp.put_u8(*val);
22019        }
22020        if matches!(version, MavlinkVersion::V2) {
22021            let len = __tmp.len();
22022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22023        } else {
22024            __tmp.len()
22025        }
22026    }
22027}
22028#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22029#[doc = ""]
22030#[doc = "ID: 12901"]
22031#[derive(Debug, Clone, PartialEq)]
22032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22034#[cfg_attr(feature = "ts", derive(TS))]
22035#[cfg_attr(feature = "ts", ts(export))]
22036pub struct OPEN_DRONE_ID_LOCATION_DATA {
22037    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22038    pub latitude: i32,
22039    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22040    pub longitude: i32,
22041    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22042    pub altitude_barometric: f32,
22043    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22044    pub altitude_geodetic: f32,
22045    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22046    pub height: f32,
22047    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22048    pub timestamp: f32,
22049    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22050    pub direction: u16,
22051    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22052    pub speed_horizontal: u16,
22053    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22054    pub speed_vertical: i16,
22055    #[doc = "System ID (0 for broadcast)."]
22056    pub target_system: u8,
22057    #[doc = "Component ID (0 for broadcast)."]
22058    pub target_component: u8,
22059    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22060    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22061    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22062    pub id_or_mac: [u8; 20],
22063    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22064    pub status: MavOdidStatus,
22065    #[doc = "Indicates the reference point for the height field."]
22066    pub height_reference: MavOdidHeightRef,
22067    #[doc = "The accuracy of the horizontal position."]
22068    pub horizontal_accuracy: MavOdidHorAcc,
22069    #[doc = "The accuracy of the vertical position."]
22070    pub vertical_accuracy: MavOdidVerAcc,
22071    #[doc = "The accuracy of the barometric altitude."]
22072    pub barometer_accuracy: MavOdidVerAcc,
22073    #[doc = "The accuracy of the horizontal and vertical speed."]
22074    pub speed_accuracy: MavOdidSpeedAcc,
22075    #[doc = "The accuracy of the timestamps."]
22076    pub timestamp_accuracy: MavOdidTimeAcc,
22077}
22078impl OPEN_DRONE_ID_LOCATION_DATA {
22079    pub const ENCODED_LEN: usize = 59usize;
22080    pub const DEFAULT: Self = Self {
22081        latitude: 0_i32,
22082        longitude: 0_i32,
22083        altitude_barometric: 0.0_f32,
22084        altitude_geodetic: 0.0_f32,
22085        height: 0.0_f32,
22086        timestamp: 0.0_f32,
22087        direction: 0_u16,
22088        speed_horizontal: 0_u16,
22089        speed_vertical: 0_i16,
22090        target_system: 0_u8,
22091        target_component: 0_u8,
22092        id_or_mac: [0_u8; 20usize],
22093        status: MavOdidStatus::DEFAULT,
22094        height_reference: MavOdidHeightRef::DEFAULT,
22095        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22096        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22097        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22098        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22099        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22100    };
22101    #[cfg(feature = "arbitrary")]
22102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22103        use arbitrary::{Arbitrary, Unstructured};
22104        let mut buf = [0u8; 1024];
22105        rng.fill_bytes(&mut buf);
22106        let mut unstructured = Unstructured::new(&buf);
22107        Self::arbitrary(&mut unstructured).unwrap_or_default()
22108    }
22109}
22110impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22111    fn default() -> Self {
22112        Self::DEFAULT.clone()
22113    }
22114}
22115impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22116    type Message = MavMessage;
22117    const ID: u32 = 12901u32;
22118    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22119    const EXTRA_CRC: u8 = 254u8;
22120    const ENCODED_LEN: usize = 59usize;
22121    fn deser(
22122        _version: MavlinkVersion,
22123        __input: &[u8],
22124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22125        let avail_len = __input.len();
22126        let mut payload_buf = [0; Self::ENCODED_LEN];
22127        let mut buf = if avail_len < Self::ENCODED_LEN {
22128            payload_buf[0..avail_len].copy_from_slice(__input);
22129            Bytes::new(&payload_buf)
22130        } else {
22131            Bytes::new(__input)
22132        };
22133        let mut __struct = Self::default();
22134        __struct.latitude = buf.get_i32_le();
22135        __struct.longitude = buf.get_i32_le();
22136        __struct.altitude_barometric = buf.get_f32_le();
22137        __struct.altitude_geodetic = buf.get_f32_le();
22138        __struct.height = buf.get_f32_le();
22139        __struct.timestamp = buf.get_f32_le();
22140        __struct.direction = buf.get_u16_le();
22141        __struct.speed_horizontal = buf.get_u16_le();
22142        __struct.speed_vertical = buf.get_i16_le();
22143        __struct.target_system = buf.get_u8();
22144        __struct.target_component = buf.get_u8();
22145        for v in &mut __struct.id_or_mac {
22146            let val = buf.get_u8();
22147            *v = val;
22148        }
22149        let tmp = buf.get_u8();
22150        __struct.status =
22151            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22152                enum_type: "MavOdidStatus",
22153                value: tmp as u32,
22154            })?;
22155        let tmp = buf.get_u8();
22156        __struct.height_reference =
22157            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22158                enum_type: "MavOdidHeightRef",
22159                value: tmp as u32,
22160            })?;
22161        let tmp = buf.get_u8();
22162        __struct.horizontal_accuracy =
22163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22164                enum_type: "MavOdidHorAcc",
22165                value: tmp as u32,
22166            })?;
22167        let tmp = buf.get_u8();
22168        __struct.vertical_accuracy =
22169            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22170                enum_type: "MavOdidVerAcc",
22171                value: tmp as u32,
22172            })?;
22173        let tmp = buf.get_u8();
22174        __struct.barometer_accuracy =
22175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22176                enum_type: "MavOdidVerAcc",
22177                value: tmp as u32,
22178            })?;
22179        let tmp = buf.get_u8();
22180        __struct.speed_accuracy =
22181            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22182                enum_type: "MavOdidSpeedAcc",
22183                value: tmp as u32,
22184            })?;
22185        let tmp = buf.get_u8();
22186        __struct.timestamp_accuracy =
22187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22188                enum_type: "MavOdidTimeAcc",
22189                value: tmp as u32,
22190            })?;
22191        Ok(__struct)
22192    }
22193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22194        let mut __tmp = BytesMut::new(bytes);
22195        #[allow(clippy::absurd_extreme_comparisons)]
22196        #[allow(unused_comparisons)]
22197        if __tmp.remaining() < Self::ENCODED_LEN {
22198            panic!(
22199                "buffer is too small (need {} bytes, but got {})",
22200                Self::ENCODED_LEN,
22201                __tmp.remaining(),
22202            )
22203        }
22204        __tmp.put_i32_le(self.latitude);
22205        __tmp.put_i32_le(self.longitude);
22206        __tmp.put_f32_le(self.altitude_barometric);
22207        __tmp.put_f32_le(self.altitude_geodetic);
22208        __tmp.put_f32_le(self.height);
22209        __tmp.put_f32_le(self.timestamp);
22210        __tmp.put_u16_le(self.direction);
22211        __tmp.put_u16_le(self.speed_horizontal);
22212        __tmp.put_i16_le(self.speed_vertical);
22213        __tmp.put_u8(self.target_system);
22214        __tmp.put_u8(self.target_component);
22215        for val in &self.id_or_mac {
22216            __tmp.put_u8(*val);
22217        }
22218        __tmp.put_u8(self.status as u8);
22219        __tmp.put_u8(self.height_reference as u8);
22220        __tmp.put_u8(self.horizontal_accuracy as u8);
22221        __tmp.put_u8(self.vertical_accuracy as u8);
22222        __tmp.put_u8(self.barometer_accuracy as u8);
22223        __tmp.put_u8(self.speed_accuracy as u8);
22224        __tmp.put_u8(self.timestamp_accuracy as u8);
22225        if matches!(version, MavlinkVersion::V2) {
22226            let len = __tmp.len();
22227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22228        } else {
22229            __tmp.len()
22230        }
22231    }
22232}
22233#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22234#[doc = ""]
22235#[doc = "ID: 12915"]
22236#[derive(Debug, Clone, PartialEq)]
22237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22239#[cfg_attr(feature = "ts", derive(TS))]
22240#[cfg_attr(feature = "ts", ts(export))]
22241pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22242    #[doc = "System ID (0 for broadcast)."]
22243    pub target_system: u8,
22244    #[doc = "Component ID (0 for broadcast)."]
22245    pub target_component: u8,
22246    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22248    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22249    pub id_or_mac: [u8; 20],
22250    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22251    pub single_message_size: u8,
22252    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22253    pub msg_pack_size: u8,
22254    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22257    pub messages: [u8; 225],
22258}
22259impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22260    pub const ENCODED_LEN: usize = 249usize;
22261    pub const DEFAULT: Self = Self {
22262        target_system: 0_u8,
22263        target_component: 0_u8,
22264        id_or_mac: [0_u8; 20usize],
22265        single_message_size: 0_u8,
22266        msg_pack_size: 0_u8,
22267        messages: [0_u8; 225usize],
22268    };
22269    #[cfg(feature = "arbitrary")]
22270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22271        use arbitrary::{Arbitrary, Unstructured};
22272        let mut buf = [0u8; 1024];
22273        rng.fill_bytes(&mut buf);
22274        let mut unstructured = Unstructured::new(&buf);
22275        Self::arbitrary(&mut unstructured).unwrap_or_default()
22276    }
22277}
22278impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22279    fn default() -> Self {
22280        Self::DEFAULT.clone()
22281    }
22282}
22283impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22284    type Message = MavMessage;
22285    const ID: u32 = 12915u32;
22286    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22287    const EXTRA_CRC: u8 = 94u8;
22288    const ENCODED_LEN: usize = 249usize;
22289    fn deser(
22290        _version: MavlinkVersion,
22291        __input: &[u8],
22292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22293        let avail_len = __input.len();
22294        let mut payload_buf = [0; Self::ENCODED_LEN];
22295        let mut buf = if avail_len < Self::ENCODED_LEN {
22296            payload_buf[0..avail_len].copy_from_slice(__input);
22297            Bytes::new(&payload_buf)
22298        } else {
22299            Bytes::new(__input)
22300        };
22301        let mut __struct = Self::default();
22302        __struct.target_system = buf.get_u8();
22303        __struct.target_component = buf.get_u8();
22304        for v in &mut __struct.id_or_mac {
22305            let val = buf.get_u8();
22306            *v = val;
22307        }
22308        __struct.single_message_size = buf.get_u8();
22309        __struct.msg_pack_size = buf.get_u8();
22310        for v in &mut __struct.messages {
22311            let val = buf.get_u8();
22312            *v = val;
22313        }
22314        Ok(__struct)
22315    }
22316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22317        let mut __tmp = BytesMut::new(bytes);
22318        #[allow(clippy::absurd_extreme_comparisons)]
22319        #[allow(unused_comparisons)]
22320        if __tmp.remaining() < Self::ENCODED_LEN {
22321            panic!(
22322                "buffer is too small (need {} bytes, but got {})",
22323                Self::ENCODED_LEN,
22324                __tmp.remaining(),
22325            )
22326        }
22327        __tmp.put_u8(self.target_system);
22328        __tmp.put_u8(self.target_component);
22329        for val in &self.id_or_mac {
22330            __tmp.put_u8(*val);
22331        }
22332        __tmp.put_u8(self.single_message_size);
22333        __tmp.put_u8(self.msg_pack_size);
22334        for val in &self.messages {
22335            __tmp.put_u8(*val);
22336        }
22337        if matches!(version, MavlinkVersion::V2) {
22338            let len = __tmp.len();
22339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22340        } else {
22341            __tmp.len()
22342        }
22343    }
22344}
22345#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22346#[doc = ""]
22347#[doc = "ID: 12905"]
22348#[derive(Debug, Clone, PartialEq)]
22349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22351#[cfg_attr(feature = "ts", derive(TS))]
22352#[cfg_attr(feature = "ts", ts(export))]
22353pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22354    #[doc = "System ID (0 for broadcast)."]
22355    pub target_system: u8,
22356    #[doc = "Component ID (0 for broadcast)."]
22357    pub target_component: u8,
22358    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22360    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22361    pub id_or_mac: [u8; 20],
22362    #[doc = "Indicates the type of the operator_id field."]
22363    pub operator_id_type: MavOdidOperatorIdType,
22364    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22366    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22367    pub operator_id: [u8; 20],
22368}
22369impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22370    pub const ENCODED_LEN: usize = 43usize;
22371    pub const DEFAULT: Self = Self {
22372        target_system: 0_u8,
22373        target_component: 0_u8,
22374        id_or_mac: [0_u8; 20usize],
22375        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22376        operator_id: [0_u8; 20usize],
22377    };
22378    #[cfg(feature = "arbitrary")]
22379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22380        use arbitrary::{Arbitrary, Unstructured};
22381        let mut buf = [0u8; 1024];
22382        rng.fill_bytes(&mut buf);
22383        let mut unstructured = Unstructured::new(&buf);
22384        Self::arbitrary(&mut unstructured).unwrap_or_default()
22385    }
22386}
22387impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22388    fn default() -> Self {
22389        Self::DEFAULT.clone()
22390    }
22391}
22392impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22393    type Message = MavMessage;
22394    const ID: u32 = 12905u32;
22395    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22396    const EXTRA_CRC: u8 = 49u8;
22397    const ENCODED_LEN: usize = 43usize;
22398    fn deser(
22399        _version: MavlinkVersion,
22400        __input: &[u8],
22401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22402        let avail_len = __input.len();
22403        let mut payload_buf = [0; Self::ENCODED_LEN];
22404        let mut buf = if avail_len < Self::ENCODED_LEN {
22405            payload_buf[0..avail_len].copy_from_slice(__input);
22406            Bytes::new(&payload_buf)
22407        } else {
22408            Bytes::new(__input)
22409        };
22410        let mut __struct = Self::default();
22411        __struct.target_system = buf.get_u8();
22412        __struct.target_component = buf.get_u8();
22413        for v in &mut __struct.id_or_mac {
22414            let val = buf.get_u8();
22415            *v = val;
22416        }
22417        let tmp = buf.get_u8();
22418        __struct.operator_id_type =
22419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22420                enum_type: "MavOdidOperatorIdType",
22421                value: tmp as u32,
22422            })?;
22423        for v in &mut __struct.operator_id {
22424            let val = buf.get_u8();
22425            *v = val;
22426        }
22427        Ok(__struct)
22428    }
22429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22430        let mut __tmp = BytesMut::new(bytes);
22431        #[allow(clippy::absurd_extreme_comparisons)]
22432        #[allow(unused_comparisons)]
22433        if __tmp.remaining() < Self::ENCODED_LEN {
22434            panic!(
22435                "buffer is too small (need {} bytes, but got {})",
22436                Self::ENCODED_LEN,
22437                __tmp.remaining(),
22438            )
22439        }
22440        __tmp.put_u8(self.target_system);
22441        __tmp.put_u8(self.target_component);
22442        for val in &self.id_or_mac {
22443            __tmp.put_u8(*val);
22444        }
22445        __tmp.put_u8(self.operator_id_type as u8);
22446        for val in &self.operator_id {
22447            __tmp.put_u8(*val);
22448        }
22449        if matches!(version, MavlinkVersion::V2) {
22450            let len = __tmp.len();
22451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22452        } else {
22453            __tmp.len()
22454        }
22455    }
22456}
22457#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22458#[doc = ""]
22459#[doc = "ID: 12903"]
22460#[derive(Debug, Clone, PartialEq)]
22461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22463#[cfg_attr(feature = "ts", derive(TS))]
22464#[cfg_attr(feature = "ts", ts(export))]
22465pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22466    #[doc = "System ID (0 for broadcast)."]
22467    pub target_system: u8,
22468    #[doc = "Component ID (0 for broadcast)."]
22469    pub target_component: u8,
22470    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22473    pub id_or_mac: [u8; 20],
22474    #[doc = "Indicates the type of the description field."]
22475    pub description_type: MavOdidDescType,
22476    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22479    pub description: [u8; 23],
22480}
22481impl OPEN_DRONE_ID_SELF_ID_DATA {
22482    pub const ENCODED_LEN: usize = 46usize;
22483    pub const DEFAULT: Self = Self {
22484        target_system: 0_u8,
22485        target_component: 0_u8,
22486        id_or_mac: [0_u8; 20usize],
22487        description_type: MavOdidDescType::DEFAULT,
22488        description: [0_u8; 23usize],
22489    };
22490    #[cfg(feature = "arbitrary")]
22491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22492        use arbitrary::{Arbitrary, Unstructured};
22493        let mut buf = [0u8; 1024];
22494        rng.fill_bytes(&mut buf);
22495        let mut unstructured = Unstructured::new(&buf);
22496        Self::arbitrary(&mut unstructured).unwrap_or_default()
22497    }
22498}
22499impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22500    fn default() -> Self {
22501        Self::DEFAULT.clone()
22502    }
22503}
22504impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22505    type Message = MavMessage;
22506    const ID: u32 = 12903u32;
22507    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22508    const EXTRA_CRC: u8 = 249u8;
22509    const ENCODED_LEN: usize = 46usize;
22510    fn deser(
22511        _version: MavlinkVersion,
22512        __input: &[u8],
22513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22514        let avail_len = __input.len();
22515        let mut payload_buf = [0; Self::ENCODED_LEN];
22516        let mut buf = if avail_len < Self::ENCODED_LEN {
22517            payload_buf[0..avail_len].copy_from_slice(__input);
22518            Bytes::new(&payload_buf)
22519        } else {
22520            Bytes::new(__input)
22521        };
22522        let mut __struct = Self::default();
22523        __struct.target_system = buf.get_u8();
22524        __struct.target_component = buf.get_u8();
22525        for v in &mut __struct.id_or_mac {
22526            let val = buf.get_u8();
22527            *v = val;
22528        }
22529        let tmp = buf.get_u8();
22530        __struct.description_type =
22531            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22532                enum_type: "MavOdidDescType",
22533                value: tmp as u32,
22534            })?;
22535        for v in &mut __struct.description {
22536            let val = buf.get_u8();
22537            *v = val;
22538        }
22539        Ok(__struct)
22540    }
22541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22542        let mut __tmp = BytesMut::new(bytes);
22543        #[allow(clippy::absurd_extreme_comparisons)]
22544        #[allow(unused_comparisons)]
22545        if __tmp.remaining() < Self::ENCODED_LEN {
22546            panic!(
22547                "buffer is too small (need {} bytes, but got {})",
22548                Self::ENCODED_LEN,
22549                __tmp.remaining(),
22550            )
22551        }
22552        __tmp.put_u8(self.target_system);
22553        __tmp.put_u8(self.target_component);
22554        for val in &self.id_or_mac {
22555            __tmp.put_u8(*val);
22556        }
22557        __tmp.put_u8(self.description_type as u8);
22558        for val in &self.description {
22559            __tmp.put_u8(*val);
22560        }
22561        if matches!(version, MavlinkVersion::V2) {
22562            let len = __tmp.len();
22563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22564        } else {
22565            __tmp.len()
22566        }
22567    }
22568}
22569#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22570#[doc = ""]
22571#[doc = "ID: 12904"]
22572#[derive(Debug, Clone, PartialEq)]
22573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22575#[cfg_attr(feature = "ts", derive(TS))]
22576#[cfg_attr(feature = "ts", ts(export))]
22577pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22578    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22579    pub operator_latitude: i32,
22580    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22581    pub operator_longitude: i32,
22582    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22583    pub area_ceiling: f32,
22584    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22585    pub area_floor: f32,
22586    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22587    pub operator_altitude_geo: f32,
22588    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22589    pub timestamp: u32,
22590    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22591    pub area_count: u16,
22592    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22593    pub area_radius: u16,
22594    #[doc = "System ID (0 for broadcast)."]
22595    pub target_system: u8,
22596    #[doc = "Component ID (0 for broadcast)."]
22597    pub target_component: u8,
22598    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22600    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22601    pub id_or_mac: [u8; 20],
22602    #[doc = "Specifies the operator location type."]
22603    pub operator_location_type: MavOdidOperatorLocationType,
22604    #[doc = "Specifies the classification type of the UA."]
22605    pub classification_type: MavOdidClassificationType,
22606    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22607    pub category_eu: MavOdidCategoryEu,
22608    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22609    pub class_eu: MavOdidClassEu,
22610}
22611impl OPEN_DRONE_ID_SYSTEM_DATA {
22612    pub const ENCODED_LEN: usize = 54usize;
22613    pub const DEFAULT: Self = Self {
22614        operator_latitude: 0_i32,
22615        operator_longitude: 0_i32,
22616        area_ceiling: 0.0_f32,
22617        area_floor: 0.0_f32,
22618        operator_altitude_geo: 0.0_f32,
22619        timestamp: 0_u32,
22620        area_count: 0_u16,
22621        area_radius: 0_u16,
22622        target_system: 0_u8,
22623        target_component: 0_u8,
22624        id_or_mac: [0_u8; 20usize],
22625        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22626        classification_type: MavOdidClassificationType::DEFAULT,
22627        category_eu: MavOdidCategoryEu::DEFAULT,
22628        class_eu: MavOdidClassEu::DEFAULT,
22629    };
22630    #[cfg(feature = "arbitrary")]
22631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22632        use arbitrary::{Arbitrary, Unstructured};
22633        let mut buf = [0u8; 1024];
22634        rng.fill_bytes(&mut buf);
22635        let mut unstructured = Unstructured::new(&buf);
22636        Self::arbitrary(&mut unstructured).unwrap_or_default()
22637    }
22638}
22639impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22640    fn default() -> Self {
22641        Self::DEFAULT.clone()
22642    }
22643}
22644impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22645    type Message = MavMessage;
22646    const ID: u32 = 12904u32;
22647    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22648    const EXTRA_CRC: u8 = 77u8;
22649    const ENCODED_LEN: usize = 54usize;
22650    fn deser(
22651        _version: MavlinkVersion,
22652        __input: &[u8],
22653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22654        let avail_len = __input.len();
22655        let mut payload_buf = [0; Self::ENCODED_LEN];
22656        let mut buf = if avail_len < Self::ENCODED_LEN {
22657            payload_buf[0..avail_len].copy_from_slice(__input);
22658            Bytes::new(&payload_buf)
22659        } else {
22660            Bytes::new(__input)
22661        };
22662        let mut __struct = Self::default();
22663        __struct.operator_latitude = buf.get_i32_le();
22664        __struct.operator_longitude = buf.get_i32_le();
22665        __struct.area_ceiling = buf.get_f32_le();
22666        __struct.area_floor = buf.get_f32_le();
22667        __struct.operator_altitude_geo = buf.get_f32_le();
22668        __struct.timestamp = buf.get_u32_le();
22669        __struct.area_count = buf.get_u16_le();
22670        __struct.area_radius = buf.get_u16_le();
22671        __struct.target_system = buf.get_u8();
22672        __struct.target_component = buf.get_u8();
22673        for v in &mut __struct.id_or_mac {
22674            let val = buf.get_u8();
22675            *v = val;
22676        }
22677        let tmp = buf.get_u8();
22678        __struct.operator_location_type =
22679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22680                enum_type: "MavOdidOperatorLocationType",
22681                value: tmp as u32,
22682            })?;
22683        let tmp = buf.get_u8();
22684        __struct.classification_type =
22685            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22686                enum_type: "MavOdidClassificationType",
22687                value: tmp as u32,
22688            })?;
22689        let tmp = buf.get_u8();
22690        __struct.category_eu =
22691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22692                enum_type: "MavOdidCategoryEu",
22693                value: tmp as u32,
22694            })?;
22695        let tmp = buf.get_u8();
22696        __struct.class_eu =
22697            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22698                enum_type: "MavOdidClassEu",
22699                value: tmp as u32,
22700            })?;
22701        Ok(__struct)
22702    }
22703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22704        let mut __tmp = BytesMut::new(bytes);
22705        #[allow(clippy::absurd_extreme_comparisons)]
22706        #[allow(unused_comparisons)]
22707        if __tmp.remaining() < Self::ENCODED_LEN {
22708            panic!(
22709                "buffer is too small (need {} bytes, but got {})",
22710                Self::ENCODED_LEN,
22711                __tmp.remaining(),
22712            )
22713        }
22714        __tmp.put_i32_le(self.operator_latitude);
22715        __tmp.put_i32_le(self.operator_longitude);
22716        __tmp.put_f32_le(self.area_ceiling);
22717        __tmp.put_f32_le(self.area_floor);
22718        __tmp.put_f32_le(self.operator_altitude_geo);
22719        __tmp.put_u32_le(self.timestamp);
22720        __tmp.put_u16_le(self.area_count);
22721        __tmp.put_u16_le(self.area_radius);
22722        __tmp.put_u8(self.target_system);
22723        __tmp.put_u8(self.target_component);
22724        for val in &self.id_or_mac {
22725            __tmp.put_u8(*val);
22726        }
22727        __tmp.put_u8(self.operator_location_type as u8);
22728        __tmp.put_u8(self.classification_type as u8);
22729        __tmp.put_u8(self.category_eu as u8);
22730        __tmp.put_u8(self.class_eu as u8);
22731        if matches!(version, MavlinkVersion::V2) {
22732            let len = __tmp.len();
22733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22734        } else {
22735            __tmp.len()
22736        }
22737    }
22738}
22739#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22740#[doc = ""]
22741#[doc = "ID: 12919"]
22742#[derive(Debug, Clone, PartialEq)]
22743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22745#[cfg_attr(feature = "ts", derive(TS))]
22746#[cfg_attr(feature = "ts", ts(export))]
22747pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22748    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22749    pub operator_latitude: i32,
22750    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22751    pub operator_longitude: i32,
22752    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22753    pub operator_altitude_geo: f32,
22754    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22755    pub timestamp: u32,
22756    #[doc = "System ID (0 for broadcast)."]
22757    pub target_system: u8,
22758    #[doc = "Component ID (0 for broadcast)."]
22759    pub target_component: u8,
22760}
22761impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22762    pub const ENCODED_LEN: usize = 18usize;
22763    pub const DEFAULT: Self = Self {
22764        operator_latitude: 0_i32,
22765        operator_longitude: 0_i32,
22766        operator_altitude_geo: 0.0_f32,
22767        timestamp: 0_u32,
22768        target_system: 0_u8,
22769        target_component: 0_u8,
22770    };
22771    #[cfg(feature = "arbitrary")]
22772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22773        use arbitrary::{Arbitrary, Unstructured};
22774        let mut buf = [0u8; 1024];
22775        rng.fill_bytes(&mut buf);
22776        let mut unstructured = Unstructured::new(&buf);
22777        Self::arbitrary(&mut unstructured).unwrap_or_default()
22778    }
22779}
22780impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22781    fn default() -> Self {
22782        Self::DEFAULT.clone()
22783    }
22784}
22785impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22786    type Message = MavMessage;
22787    const ID: u32 = 12919u32;
22788    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22789    const EXTRA_CRC: u8 = 7u8;
22790    const ENCODED_LEN: usize = 18usize;
22791    fn deser(
22792        _version: MavlinkVersion,
22793        __input: &[u8],
22794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22795        let avail_len = __input.len();
22796        let mut payload_buf = [0; Self::ENCODED_LEN];
22797        let mut buf = if avail_len < Self::ENCODED_LEN {
22798            payload_buf[0..avail_len].copy_from_slice(__input);
22799            Bytes::new(&payload_buf)
22800        } else {
22801            Bytes::new(__input)
22802        };
22803        let mut __struct = Self::default();
22804        __struct.operator_latitude = buf.get_i32_le();
22805        __struct.operator_longitude = buf.get_i32_le();
22806        __struct.operator_altitude_geo = buf.get_f32_le();
22807        __struct.timestamp = buf.get_u32_le();
22808        __struct.target_system = buf.get_u8();
22809        __struct.target_component = buf.get_u8();
22810        Ok(__struct)
22811    }
22812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22813        let mut __tmp = BytesMut::new(bytes);
22814        #[allow(clippy::absurd_extreme_comparisons)]
22815        #[allow(unused_comparisons)]
22816        if __tmp.remaining() < Self::ENCODED_LEN {
22817            panic!(
22818                "buffer is too small (need {} bytes, but got {})",
22819                Self::ENCODED_LEN,
22820                __tmp.remaining(),
22821            )
22822        }
22823        __tmp.put_i32_le(self.operator_latitude);
22824        __tmp.put_i32_le(self.operator_longitude);
22825        __tmp.put_f32_le(self.operator_altitude_geo);
22826        __tmp.put_u32_le(self.timestamp);
22827        __tmp.put_u8(self.target_system);
22828        __tmp.put_u8(self.target_component);
22829        if matches!(version, MavlinkVersion::V2) {
22830            let len = __tmp.len();
22831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22832        } else {
22833            __tmp.len()
22834        }
22835    }
22836}
22837#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22838#[doc = ""]
22839#[doc = "ID: 100"]
22840#[derive(Debug, Clone, PartialEq)]
22841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22843#[cfg_attr(feature = "ts", derive(TS))]
22844#[cfg_attr(feature = "ts", ts(export))]
22845pub struct OPTICAL_FLOW_DATA {
22846    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22847    pub time_usec: u64,
22848    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22849    pub flow_comp_m_x: f32,
22850    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22851    pub flow_comp_m_y: f32,
22852    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22853    pub ground_distance: f32,
22854    #[doc = "Flow in x-sensor direction"]
22855    pub flow_x: i16,
22856    #[doc = "Flow in y-sensor direction"]
22857    pub flow_y: i16,
22858    #[doc = "Sensor ID"]
22859    pub sensor_id: u8,
22860    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22861    pub quality: u8,
22862    #[doc = "Flow rate about X axis"]
22863    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22864    pub flow_rate_x: f32,
22865    #[doc = "Flow rate about Y axis"]
22866    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22867    pub flow_rate_y: f32,
22868}
22869impl OPTICAL_FLOW_DATA {
22870    pub const ENCODED_LEN: usize = 34usize;
22871    pub const DEFAULT: Self = Self {
22872        time_usec: 0_u64,
22873        flow_comp_m_x: 0.0_f32,
22874        flow_comp_m_y: 0.0_f32,
22875        ground_distance: 0.0_f32,
22876        flow_x: 0_i16,
22877        flow_y: 0_i16,
22878        sensor_id: 0_u8,
22879        quality: 0_u8,
22880        flow_rate_x: 0.0_f32,
22881        flow_rate_y: 0.0_f32,
22882    };
22883    #[cfg(feature = "arbitrary")]
22884    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22885        use arbitrary::{Arbitrary, Unstructured};
22886        let mut buf = [0u8; 1024];
22887        rng.fill_bytes(&mut buf);
22888        let mut unstructured = Unstructured::new(&buf);
22889        Self::arbitrary(&mut unstructured).unwrap_or_default()
22890    }
22891}
22892impl Default for OPTICAL_FLOW_DATA {
22893    fn default() -> Self {
22894        Self::DEFAULT.clone()
22895    }
22896}
22897impl MessageData for OPTICAL_FLOW_DATA {
22898    type Message = MavMessage;
22899    const ID: u32 = 100u32;
22900    const NAME: &'static str = "OPTICAL_FLOW";
22901    const EXTRA_CRC: u8 = 175u8;
22902    const ENCODED_LEN: usize = 34usize;
22903    fn deser(
22904        _version: MavlinkVersion,
22905        __input: &[u8],
22906    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22907        let avail_len = __input.len();
22908        let mut payload_buf = [0; Self::ENCODED_LEN];
22909        let mut buf = if avail_len < Self::ENCODED_LEN {
22910            payload_buf[0..avail_len].copy_from_slice(__input);
22911            Bytes::new(&payload_buf)
22912        } else {
22913            Bytes::new(__input)
22914        };
22915        let mut __struct = Self::default();
22916        __struct.time_usec = buf.get_u64_le();
22917        __struct.flow_comp_m_x = buf.get_f32_le();
22918        __struct.flow_comp_m_y = buf.get_f32_le();
22919        __struct.ground_distance = buf.get_f32_le();
22920        __struct.flow_x = buf.get_i16_le();
22921        __struct.flow_y = buf.get_i16_le();
22922        __struct.sensor_id = buf.get_u8();
22923        __struct.quality = buf.get_u8();
22924        __struct.flow_rate_x = buf.get_f32_le();
22925        __struct.flow_rate_y = buf.get_f32_le();
22926        Ok(__struct)
22927    }
22928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22929        let mut __tmp = BytesMut::new(bytes);
22930        #[allow(clippy::absurd_extreme_comparisons)]
22931        #[allow(unused_comparisons)]
22932        if __tmp.remaining() < Self::ENCODED_LEN {
22933            panic!(
22934                "buffer is too small (need {} bytes, but got {})",
22935                Self::ENCODED_LEN,
22936                __tmp.remaining(),
22937            )
22938        }
22939        __tmp.put_u64_le(self.time_usec);
22940        __tmp.put_f32_le(self.flow_comp_m_x);
22941        __tmp.put_f32_le(self.flow_comp_m_y);
22942        __tmp.put_f32_le(self.ground_distance);
22943        __tmp.put_i16_le(self.flow_x);
22944        __tmp.put_i16_le(self.flow_y);
22945        __tmp.put_u8(self.sensor_id);
22946        __tmp.put_u8(self.quality);
22947        if matches!(version, MavlinkVersion::V2) {
22948            __tmp.put_f32_le(self.flow_rate_x);
22949            __tmp.put_f32_le(self.flow_rate_y);
22950            let len = __tmp.len();
22951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22952        } else {
22953            __tmp.len()
22954        }
22955    }
22956}
22957#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22958#[doc = ""]
22959#[doc = "ID: 106"]
22960#[derive(Debug, Clone, PartialEq)]
22961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22963#[cfg_attr(feature = "ts", derive(TS))]
22964#[cfg_attr(feature = "ts", ts(export))]
22965pub struct OPTICAL_FLOW_RAD_DATA {
22966    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22967    pub time_usec: u64,
22968    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22969    pub integration_time_us: u32,
22970    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22971    pub integrated_x: f32,
22972    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22973    pub integrated_y: f32,
22974    #[doc = "RH rotation around X axis"]
22975    pub integrated_xgyro: f32,
22976    #[doc = "RH rotation around Y axis"]
22977    pub integrated_ygyro: f32,
22978    #[doc = "RH rotation around Z axis"]
22979    pub integrated_zgyro: f32,
22980    #[doc = "Time since the distance was sampled."]
22981    pub time_delta_distance_us: u32,
22982    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22983    pub distance: f32,
22984    #[doc = "Temperature"]
22985    pub temperature: i16,
22986    #[doc = "Sensor ID"]
22987    pub sensor_id: u8,
22988    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22989    pub quality: u8,
22990}
22991impl OPTICAL_FLOW_RAD_DATA {
22992    pub const ENCODED_LEN: usize = 44usize;
22993    pub const DEFAULT: Self = Self {
22994        time_usec: 0_u64,
22995        integration_time_us: 0_u32,
22996        integrated_x: 0.0_f32,
22997        integrated_y: 0.0_f32,
22998        integrated_xgyro: 0.0_f32,
22999        integrated_ygyro: 0.0_f32,
23000        integrated_zgyro: 0.0_f32,
23001        time_delta_distance_us: 0_u32,
23002        distance: 0.0_f32,
23003        temperature: 0_i16,
23004        sensor_id: 0_u8,
23005        quality: 0_u8,
23006    };
23007    #[cfg(feature = "arbitrary")]
23008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23009        use arbitrary::{Arbitrary, Unstructured};
23010        let mut buf = [0u8; 1024];
23011        rng.fill_bytes(&mut buf);
23012        let mut unstructured = Unstructured::new(&buf);
23013        Self::arbitrary(&mut unstructured).unwrap_or_default()
23014    }
23015}
23016impl Default for OPTICAL_FLOW_RAD_DATA {
23017    fn default() -> Self {
23018        Self::DEFAULT.clone()
23019    }
23020}
23021impl MessageData for OPTICAL_FLOW_RAD_DATA {
23022    type Message = MavMessage;
23023    const ID: u32 = 106u32;
23024    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23025    const EXTRA_CRC: u8 = 138u8;
23026    const ENCODED_LEN: usize = 44usize;
23027    fn deser(
23028        _version: MavlinkVersion,
23029        __input: &[u8],
23030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23031        let avail_len = __input.len();
23032        let mut payload_buf = [0; Self::ENCODED_LEN];
23033        let mut buf = if avail_len < Self::ENCODED_LEN {
23034            payload_buf[0..avail_len].copy_from_slice(__input);
23035            Bytes::new(&payload_buf)
23036        } else {
23037            Bytes::new(__input)
23038        };
23039        let mut __struct = Self::default();
23040        __struct.time_usec = buf.get_u64_le();
23041        __struct.integration_time_us = buf.get_u32_le();
23042        __struct.integrated_x = buf.get_f32_le();
23043        __struct.integrated_y = buf.get_f32_le();
23044        __struct.integrated_xgyro = buf.get_f32_le();
23045        __struct.integrated_ygyro = buf.get_f32_le();
23046        __struct.integrated_zgyro = buf.get_f32_le();
23047        __struct.time_delta_distance_us = buf.get_u32_le();
23048        __struct.distance = buf.get_f32_le();
23049        __struct.temperature = buf.get_i16_le();
23050        __struct.sensor_id = buf.get_u8();
23051        __struct.quality = buf.get_u8();
23052        Ok(__struct)
23053    }
23054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23055        let mut __tmp = BytesMut::new(bytes);
23056        #[allow(clippy::absurd_extreme_comparisons)]
23057        #[allow(unused_comparisons)]
23058        if __tmp.remaining() < Self::ENCODED_LEN {
23059            panic!(
23060                "buffer is too small (need {} bytes, but got {})",
23061                Self::ENCODED_LEN,
23062                __tmp.remaining(),
23063            )
23064        }
23065        __tmp.put_u64_le(self.time_usec);
23066        __tmp.put_u32_le(self.integration_time_us);
23067        __tmp.put_f32_le(self.integrated_x);
23068        __tmp.put_f32_le(self.integrated_y);
23069        __tmp.put_f32_le(self.integrated_xgyro);
23070        __tmp.put_f32_le(self.integrated_ygyro);
23071        __tmp.put_f32_le(self.integrated_zgyro);
23072        __tmp.put_u32_le(self.time_delta_distance_us);
23073        __tmp.put_f32_le(self.distance);
23074        __tmp.put_i16_le(self.temperature);
23075        __tmp.put_u8(self.sensor_id);
23076        __tmp.put_u8(self.quality);
23077        if matches!(version, MavlinkVersion::V2) {
23078            let len = __tmp.len();
23079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23080        } else {
23081            __tmp.len()
23082        }
23083    }
23084}
23085#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23086#[doc = ""]
23087#[doc = "ID: 360"]
23088#[derive(Debug, Clone, PartialEq)]
23089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23091#[cfg_attr(feature = "ts", derive(TS))]
23092#[cfg_attr(feature = "ts", ts(export))]
23093pub struct ORBIT_EXECUTION_STATUS_DATA {
23094    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23095    pub time_usec: u64,
23096    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23097    pub radius: f32,
23098    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23099    pub x: i32,
23100    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23101    pub y: i32,
23102    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23103    pub z: f32,
23104    #[doc = "The coordinate system of the fields: x, y, z."]
23105    pub frame: MavFrame,
23106}
23107impl ORBIT_EXECUTION_STATUS_DATA {
23108    pub const ENCODED_LEN: usize = 25usize;
23109    pub const DEFAULT: Self = Self {
23110        time_usec: 0_u64,
23111        radius: 0.0_f32,
23112        x: 0_i32,
23113        y: 0_i32,
23114        z: 0.0_f32,
23115        frame: MavFrame::DEFAULT,
23116    };
23117    #[cfg(feature = "arbitrary")]
23118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23119        use arbitrary::{Arbitrary, Unstructured};
23120        let mut buf = [0u8; 1024];
23121        rng.fill_bytes(&mut buf);
23122        let mut unstructured = Unstructured::new(&buf);
23123        Self::arbitrary(&mut unstructured).unwrap_or_default()
23124    }
23125}
23126impl Default for ORBIT_EXECUTION_STATUS_DATA {
23127    fn default() -> Self {
23128        Self::DEFAULT.clone()
23129    }
23130}
23131impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23132    type Message = MavMessage;
23133    const ID: u32 = 360u32;
23134    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23135    const EXTRA_CRC: u8 = 11u8;
23136    const ENCODED_LEN: usize = 25usize;
23137    fn deser(
23138        _version: MavlinkVersion,
23139        __input: &[u8],
23140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23141        let avail_len = __input.len();
23142        let mut payload_buf = [0; Self::ENCODED_LEN];
23143        let mut buf = if avail_len < Self::ENCODED_LEN {
23144            payload_buf[0..avail_len].copy_from_slice(__input);
23145            Bytes::new(&payload_buf)
23146        } else {
23147            Bytes::new(__input)
23148        };
23149        let mut __struct = Self::default();
23150        __struct.time_usec = buf.get_u64_le();
23151        __struct.radius = buf.get_f32_le();
23152        __struct.x = buf.get_i32_le();
23153        __struct.y = buf.get_i32_le();
23154        __struct.z = buf.get_f32_le();
23155        let tmp = buf.get_u8();
23156        __struct.frame =
23157            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23158                enum_type: "MavFrame",
23159                value: tmp as u32,
23160            })?;
23161        Ok(__struct)
23162    }
23163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23164        let mut __tmp = BytesMut::new(bytes);
23165        #[allow(clippy::absurd_extreme_comparisons)]
23166        #[allow(unused_comparisons)]
23167        if __tmp.remaining() < Self::ENCODED_LEN {
23168            panic!(
23169                "buffer is too small (need {} bytes, but got {})",
23170                Self::ENCODED_LEN,
23171                __tmp.remaining(),
23172            )
23173        }
23174        __tmp.put_u64_le(self.time_usec);
23175        __tmp.put_f32_le(self.radius);
23176        __tmp.put_i32_le(self.x);
23177        __tmp.put_i32_le(self.y);
23178        __tmp.put_f32_le(self.z);
23179        __tmp.put_u8(self.frame as u8);
23180        if matches!(version, MavlinkVersion::V2) {
23181            let len = __tmp.len();
23182            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23183        } else {
23184            __tmp.len()
23185        }
23186    }
23187}
23188#[doc = "Response from a PARAM_EXT_SET message."]
23189#[doc = ""]
23190#[doc = "ID: 324"]
23191#[derive(Debug, Clone, PartialEq)]
23192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23194#[cfg_attr(feature = "ts", derive(TS))]
23195#[cfg_attr(feature = "ts", ts(export))]
23196pub struct PARAM_EXT_ACK_DATA {
23197    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23198    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23199    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23200    pub param_id: [u8; 16],
23201    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23202    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23203    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23204    pub param_value: [u8; 128],
23205    #[doc = "Parameter type."]
23206    pub param_type: MavParamExtType,
23207    #[doc = "Result code."]
23208    pub param_result: ParamAck,
23209}
23210impl PARAM_EXT_ACK_DATA {
23211    pub const ENCODED_LEN: usize = 146usize;
23212    pub const DEFAULT: Self = Self {
23213        param_id: [0_u8; 16usize],
23214        param_value: [0_u8; 128usize],
23215        param_type: MavParamExtType::DEFAULT,
23216        param_result: ParamAck::DEFAULT,
23217    };
23218    #[cfg(feature = "arbitrary")]
23219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23220        use arbitrary::{Arbitrary, Unstructured};
23221        let mut buf = [0u8; 1024];
23222        rng.fill_bytes(&mut buf);
23223        let mut unstructured = Unstructured::new(&buf);
23224        Self::arbitrary(&mut unstructured).unwrap_or_default()
23225    }
23226}
23227impl Default for PARAM_EXT_ACK_DATA {
23228    fn default() -> Self {
23229        Self::DEFAULT.clone()
23230    }
23231}
23232impl MessageData for PARAM_EXT_ACK_DATA {
23233    type Message = MavMessage;
23234    const ID: u32 = 324u32;
23235    const NAME: &'static str = "PARAM_EXT_ACK";
23236    const EXTRA_CRC: u8 = 132u8;
23237    const ENCODED_LEN: usize = 146usize;
23238    fn deser(
23239        _version: MavlinkVersion,
23240        __input: &[u8],
23241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23242        let avail_len = __input.len();
23243        let mut payload_buf = [0; Self::ENCODED_LEN];
23244        let mut buf = if avail_len < Self::ENCODED_LEN {
23245            payload_buf[0..avail_len].copy_from_slice(__input);
23246            Bytes::new(&payload_buf)
23247        } else {
23248            Bytes::new(__input)
23249        };
23250        let mut __struct = Self::default();
23251        for v in &mut __struct.param_id {
23252            let val = buf.get_u8();
23253            *v = val;
23254        }
23255        for v in &mut __struct.param_value {
23256            let val = buf.get_u8();
23257            *v = val;
23258        }
23259        let tmp = buf.get_u8();
23260        __struct.param_type =
23261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23262                enum_type: "MavParamExtType",
23263                value: tmp as u32,
23264            })?;
23265        let tmp = buf.get_u8();
23266        __struct.param_result =
23267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23268                enum_type: "ParamAck",
23269                value: tmp as u32,
23270            })?;
23271        Ok(__struct)
23272    }
23273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23274        let mut __tmp = BytesMut::new(bytes);
23275        #[allow(clippy::absurd_extreme_comparisons)]
23276        #[allow(unused_comparisons)]
23277        if __tmp.remaining() < Self::ENCODED_LEN {
23278            panic!(
23279                "buffer is too small (need {} bytes, but got {})",
23280                Self::ENCODED_LEN,
23281                __tmp.remaining(),
23282            )
23283        }
23284        for val in &self.param_id {
23285            __tmp.put_u8(*val);
23286        }
23287        for val in &self.param_value {
23288            __tmp.put_u8(*val);
23289        }
23290        __tmp.put_u8(self.param_type as u8);
23291        __tmp.put_u8(self.param_result as u8);
23292        if matches!(version, MavlinkVersion::V2) {
23293            let len = __tmp.len();
23294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23295        } else {
23296            __tmp.len()
23297        }
23298    }
23299}
23300#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23301#[doc = ""]
23302#[doc = "ID: 321"]
23303#[derive(Debug, Clone, PartialEq)]
23304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23306#[cfg_attr(feature = "ts", derive(TS))]
23307#[cfg_attr(feature = "ts", ts(export))]
23308pub struct PARAM_EXT_REQUEST_LIST_DATA {
23309    #[doc = "System ID"]
23310    pub target_system: u8,
23311    #[doc = "Component ID"]
23312    pub target_component: u8,
23313}
23314impl PARAM_EXT_REQUEST_LIST_DATA {
23315    pub const ENCODED_LEN: usize = 2usize;
23316    pub const DEFAULT: Self = Self {
23317        target_system: 0_u8,
23318        target_component: 0_u8,
23319    };
23320    #[cfg(feature = "arbitrary")]
23321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23322        use arbitrary::{Arbitrary, Unstructured};
23323        let mut buf = [0u8; 1024];
23324        rng.fill_bytes(&mut buf);
23325        let mut unstructured = Unstructured::new(&buf);
23326        Self::arbitrary(&mut unstructured).unwrap_or_default()
23327    }
23328}
23329impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23330    fn default() -> Self {
23331        Self::DEFAULT.clone()
23332    }
23333}
23334impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23335    type Message = MavMessage;
23336    const ID: u32 = 321u32;
23337    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23338    const EXTRA_CRC: u8 = 88u8;
23339    const ENCODED_LEN: usize = 2usize;
23340    fn deser(
23341        _version: MavlinkVersion,
23342        __input: &[u8],
23343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23344        let avail_len = __input.len();
23345        let mut payload_buf = [0; Self::ENCODED_LEN];
23346        let mut buf = if avail_len < Self::ENCODED_LEN {
23347            payload_buf[0..avail_len].copy_from_slice(__input);
23348            Bytes::new(&payload_buf)
23349        } else {
23350            Bytes::new(__input)
23351        };
23352        let mut __struct = Self::default();
23353        __struct.target_system = buf.get_u8();
23354        __struct.target_component = buf.get_u8();
23355        Ok(__struct)
23356    }
23357    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23358        let mut __tmp = BytesMut::new(bytes);
23359        #[allow(clippy::absurd_extreme_comparisons)]
23360        #[allow(unused_comparisons)]
23361        if __tmp.remaining() < Self::ENCODED_LEN {
23362            panic!(
23363                "buffer is too small (need {} bytes, but got {})",
23364                Self::ENCODED_LEN,
23365                __tmp.remaining(),
23366            )
23367        }
23368        __tmp.put_u8(self.target_system);
23369        __tmp.put_u8(self.target_component);
23370        if matches!(version, MavlinkVersion::V2) {
23371            let len = __tmp.len();
23372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23373        } else {
23374            __tmp.len()
23375        }
23376    }
23377}
23378#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23379#[doc = ""]
23380#[doc = "ID: 320"]
23381#[derive(Debug, Clone, PartialEq)]
23382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23384#[cfg_attr(feature = "ts", derive(TS))]
23385#[cfg_attr(feature = "ts", ts(export))]
23386pub struct PARAM_EXT_REQUEST_READ_DATA {
23387    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23388    pub param_index: i16,
23389    #[doc = "System ID"]
23390    pub target_system: u8,
23391    #[doc = "Component ID"]
23392    pub target_component: u8,
23393    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23394    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23395    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23396    pub param_id: [u8; 16],
23397}
23398impl PARAM_EXT_REQUEST_READ_DATA {
23399    pub const ENCODED_LEN: usize = 20usize;
23400    pub const DEFAULT: Self = Self {
23401        param_index: 0_i16,
23402        target_system: 0_u8,
23403        target_component: 0_u8,
23404        param_id: [0_u8; 16usize],
23405    };
23406    #[cfg(feature = "arbitrary")]
23407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23408        use arbitrary::{Arbitrary, Unstructured};
23409        let mut buf = [0u8; 1024];
23410        rng.fill_bytes(&mut buf);
23411        let mut unstructured = Unstructured::new(&buf);
23412        Self::arbitrary(&mut unstructured).unwrap_or_default()
23413    }
23414}
23415impl Default for PARAM_EXT_REQUEST_READ_DATA {
23416    fn default() -> Self {
23417        Self::DEFAULT.clone()
23418    }
23419}
23420impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23421    type Message = MavMessage;
23422    const ID: u32 = 320u32;
23423    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23424    const EXTRA_CRC: u8 = 243u8;
23425    const ENCODED_LEN: usize = 20usize;
23426    fn deser(
23427        _version: MavlinkVersion,
23428        __input: &[u8],
23429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23430        let avail_len = __input.len();
23431        let mut payload_buf = [0; Self::ENCODED_LEN];
23432        let mut buf = if avail_len < Self::ENCODED_LEN {
23433            payload_buf[0..avail_len].copy_from_slice(__input);
23434            Bytes::new(&payload_buf)
23435        } else {
23436            Bytes::new(__input)
23437        };
23438        let mut __struct = Self::default();
23439        __struct.param_index = buf.get_i16_le();
23440        __struct.target_system = buf.get_u8();
23441        __struct.target_component = buf.get_u8();
23442        for v in &mut __struct.param_id {
23443            let val = buf.get_u8();
23444            *v = val;
23445        }
23446        Ok(__struct)
23447    }
23448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23449        let mut __tmp = BytesMut::new(bytes);
23450        #[allow(clippy::absurd_extreme_comparisons)]
23451        #[allow(unused_comparisons)]
23452        if __tmp.remaining() < Self::ENCODED_LEN {
23453            panic!(
23454                "buffer is too small (need {} bytes, but got {})",
23455                Self::ENCODED_LEN,
23456                __tmp.remaining(),
23457            )
23458        }
23459        __tmp.put_i16_le(self.param_index);
23460        __tmp.put_u8(self.target_system);
23461        __tmp.put_u8(self.target_component);
23462        for val in &self.param_id {
23463            __tmp.put_u8(*val);
23464        }
23465        if matches!(version, MavlinkVersion::V2) {
23466            let len = __tmp.len();
23467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23468        } else {
23469            __tmp.len()
23470        }
23471    }
23472}
23473#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23474#[doc = ""]
23475#[doc = "ID: 323"]
23476#[derive(Debug, Clone, PartialEq)]
23477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23479#[cfg_attr(feature = "ts", derive(TS))]
23480#[cfg_attr(feature = "ts", ts(export))]
23481pub struct PARAM_EXT_SET_DATA {
23482    #[doc = "System ID"]
23483    pub target_system: u8,
23484    #[doc = "Component ID"]
23485    pub target_component: u8,
23486    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23489    pub param_id: [u8; 16],
23490    #[doc = "Parameter value"]
23491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23493    pub param_value: [u8; 128],
23494    #[doc = "Parameter type."]
23495    pub param_type: MavParamExtType,
23496}
23497impl PARAM_EXT_SET_DATA {
23498    pub const ENCODED_LEN: usize = 147usize;
23499    pub const DEFAULT: Self = Self {
23500        target_system: 0_u8,
23501        target_component: 0_u8,
23502        param_id: [0_u8; 16usize],
23503        param_value: [0_u8; 128usize],
23504        param_type: MavParamExtType::DEFAULT,
23505    };
23506    #[cfg(feature = "arbitrary")]
23507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23508        use arbitrary::{Arbitrary, Unstructured};
23509        let mut buf = [0u8; 1024];
23510        rng.fill_bytes(&mut buf);
23511        let mut unstructured = Unstructured::new(&buf);
23512        Self::arbitrary(&mut unstructured).unwrap_or_default()
23513    }
23514}
23515impl Default for PARAM_EXT_SET_DATA {
23516    fn default() -> Self {
23517        Self::DEFAULT.clone()
23518    }
23519}
23520impl MessageData for PARAM_EXT_SET_DATA {
23521    type Message = MavMessage;
23522    const ID: u32 = 323u32;
23523    const NAME: &'static str = "PARAM_EXT_SET";
23524    const EXTRA_CRC: u8 = 78u8;
23525    const ENCODED_LEN: usize = 147usize;
23526    fn deser(
23527        _version: MavlinkVersion,
23528        __input: &[u8],
23529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23530        let avail_len = __input.len();
23531        let mut payload_buf = [0; Self::ENCODED_LEN];
23532        let mut buf = if avail_len < Self::ENCODED_LEN {
23533            payload_buf[0..avail_len].copy_from_slice(__input);
23534            Bytes::new(&payload_buf)
23535        } else {
23536            Bytes::new(__input)
23537        };
23538        let mut __struct = Self::default();
23539        __struct.target_system = buf.get_u8();
23540        __struct.target_component = buf.get_u8();
23541        for v in &mut __struct.param_id {
23542            let val = buf.get_u8();
23543            *v = val;
23544        }
23545        for v in &mut __struct.param_value {
23546            let val = buf.get_u8();
23547            *v = val;
23548        }
23549        let tmp = buf.get_u8();
23550        __struct.param_type =
23551            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23552                enum_type: "MavParamExtType",
23553                value: tmp as u32,
23554            })?;
23555        Ok(__struct)
23556    }
23557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23558        let mut __tmp = BytesMut::new(bytes);
23559        #[allow(clippy::absurd_extreme_comparisons)]
23560        #[allow(unused_comparisons)]
23561        if __tmp.remaining() < Self::ENCODED_LEN {
23562            panic!(
23563                "buffer is too small (need {} bytes, but got {})",
23564                Self::ENCODED_LEN,
23565                __tmp.remaining(),
23566            )
23567        }
23568        __tmp.put_u8(self.target_system);
23569        __tmp.put_u8(self.target_component);
23570        for val in &self.param_id {
23571            __tmp.put_u8(*val);
23572        }
23573        for val in &self.param_value {
23574            __tmp.put_u8(*val);
23575        }
23576        __tmp.put_u8(self.param_type as u8);
23577        if matches!(version, MavlinkVersion::V2) {
23578            let len = __tmp.len();
23579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23580        } else {
23581            __tmp.len()
23582        }
23583    }
23584}
23585#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23586#[doc = ""]
23587#[doc = "ID: 322"]
23588#[derive(Debug, Clone, PartialEq)]
23589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23591#[cfg_attr(feature = "ts", derive(TS))]
23592#[cfg_attr(feature = "ts", ts(export))]
23593pub struct PARAM_EXT_VALUE_DATA {
23594    #[doc = "Total number of parameters"]
23595    pub param_count: u16,
23596    #[doc = "Index of this parameter"]
23597    pub param_index: u16,
23598    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23600    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23601    pub param_id: [u8; 16],
23602    #[doc = "Parameter value"]
23603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23605    pub param_value: [u8; 128],
23606    #[doc = "Parameter type."]
23607    pub param_type: MavParamExtType,
23608}
23609impl PARAM_EXT_VALUE_DATA {
23610    pub const ENCODED_LEN: usize = 149usize;
23611    pub const DEFAULT: Self = Self {
23612        param_count: 0_u16,
23613        param_index: 0_u16,
23614        param_id: [0_u8; 16usize],
23615        param_value: [0_u8; 128usize],
23616        param_type: MavParamExtType::DEFAULT,
23617    };
23618    #[cfg(feature = "arbitrary")]
23619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23620        use arbitrary::{Arbitrary, Unstructured};
23621        let mut buf = [0u8; 1024];
23622        rng.fill_bytes(&mut buf);
23623        let mut unstructured = Unstructured::new(&buf);
23624        Self::arbitrary(&mut unstructured).unwrap_or_default()
23625    }
23626}
23627impl Default for PARAM_EXT_VALUE_DATA {
23628    fn default() -> Self {
23629        Self::DEFAULT.clone()
23630    }
23631}
23632impl MessageData for PARAM_EXT_VALUE_DATA {
23633    type Message = MavMessage;
23634    const ID: u32 = 322u32;
23635    const NAME: &'static str = "PARAM_EXT_VALUE";
23636    const EXTRA_CRC: u8 = 243u8;
23637    const ENCODED_LEN: usize = 149usize;
23638    fn deser(
23639        _version: MavlinkVersion,
23640        __input: &[u8],
23641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23642        let avail_len = __input.len();
23643        let mut payload_buf = [0; Self::ENCODED_LEN];
23644        let mut buf = if avail_len < Self::ENCODED_LEN {
23645            payload_buf[0..avail_len].copy_from_slice(__input);
23646            Bytes::new(&payload_buf)
23647        } else {
23648            Bytes::new(__input)
23649        };
23650        let mut __struct = Self::default();
23651        __struct.param_count = buf.get_u16_le();
23652        __struct.param_index = buf.get_u16_le();
23653        for v in &mut __struct.param_id {
23654            let val = buf.get_u8();
23655            *v = val;
23656        }
23657        for v in &mut __struct.param_value {
23658            let val = buf.get_u8();
23659            *v = val;
23660        }
23661        let tmp = buf.get_u8();
23662        __struct.param_type =
23663            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23664                enum_type: "MavParamExtType",
23665                value: tmp as u32,
23666            })?;
23667        Ok(__struct)
23668    }
23669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23670        let mut __tmp = BytesMut::new(bytes);
23671        #[allow(clippy::absurd_extreme_comparisons)]
23672        #[allow(unused_comparisons)]
23673        if __tmp.remaining() < Self::ENCODED_LEN {
23674            panic!(
23675                "buffer is too small (need {} bytes, but got {})",
23676                Self::ENCODED_LEN,
23677                __tmp.remaining(),
23678            )
23679        }
23680        __tmp.put_u16_le(self.param_count);
23681        __tmp.put_u16_le(self.param_index);
23682        for val in &self.param_id {
23683            __tmp.put_u8(*val);
23684        }
23685        for val in &self.param_value {
23686            __tmp.put_u8(*val);
23687        }
23688        __tmp.put_u8(self.param_type as u8);
23689        if matches!(version, MavlinkVersion::V2) {
23690            let len = __tmp.len();
23691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23692        } else {
23693            __tmp.len()
23694        }
23695    }
23696}
23697#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23698#[doc = ""]
23699#[doc = "ID: 50"]
23700#[derive(Debug, Clone, PartialEq)]
23701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23703#[cfg_attr(feature = "ts", derive(TS))]
23704#[cfg_attr(feature = "ts", ts(export))]
23705pub struct PARAM_MAP_RC_DATA {
23706    #[doc = "Initial parameter value"]
23707    pub param_value0: f32,
23708    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23709    pub scale: f32,
23710    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23711    pub param_value_min: f32,
23712    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23713    pub param_value_max: f32,
23714    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23715    pub param_index: i16,
23716    #[doc = "System ID"]
23717    pub target_system: u8,
23718    #[doc = "Component ID"]
23719    pub target_component: u8,
23720    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23723    pub param_id: [u8; 16],
23724    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23725    pub parameter_rc_channel_index: u8,
23726}
23727impl PARAM_MAP_RC_DATA {
23728    pub const ENCODED_LEN: usize = 37usize;
23729    pub const DEFAULT: Self = Self {
23730        param_value0: 0.0_f32,
23731        scale: 0.0_f32,
23732        param_value_min: 0.0_f32,
23733        param_value_max: 0.0_f32,
23734        param_index: 0_i16,
23735        target_system: 0_u8,
23736        target_component: 0_u8,
23737        param_id: [0_u8; 16usize],
23738        parameter_rc_channel_index: 0_u8,
23739    };
23740    #[cfg(feature = "arbitrary")]
23741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23742        use arbitrary::{Arbitrary, Unstructured};
23743        let mut buf = [0u8; 1024];
23744        rng.fill_bytes(&mut buf);
23745        let mut unstructured = Unstructured::new(&buf);
23746        Self::arbitrary(&mut unstructured).unwrap_or_default()
23747    }
23748}
23749impl Default for PARAM_MAP_RC_DATA {
23750    fn default() -> Self {
23751        Self::DEFAULT.clone()
23752    }
23753}
23754impl MessageData for PARAM_MAP_RC_DATA {
23755    type Message = MavMessage;
23756    const ID: u32 = 50u32;
23757    const NAME: &'static str = "PARAM_MAP_RC";
23758    const EXTRA_CRC: u8 = 78u8;
23759    const ENCODED_LEN: usize = 37usize;
23760    fn deser(
23761        _version: MavlinkVersion,
23762        __input: &[u8],
23763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23764        let avail_len = __input.len();
23765        let mut payload_buf = [0; Self::ENCODED_LEN];
23766        let mut buf = if avail_len < Self::ENCODED_LEN {
23767            payload_buf[0..avail_len].copy_from_slice(__input);
23768            Bytes::new(&payload_buf)
23769        } else {
23770            Bytes::new(__input)
23771        };
23772        let mut __struct = Self::default();
23773        __struct.param_value0 = buf.get_f32_le();
23774        __struct.scale = buf.get_f32_le();
23775        __struct.param_value_min = buf.get_f32_le();
23776        __struct.param_value_max = buf.get_f32_le();
23777        __struct.param_index = buf.get_i16_le();
23778        __struct.target_system = buf.get_u8();
23779        __struct.target_component = buf.get_u8();
23780        for v in &mut __struct.param_id {
23781            let val = buf.get_u8();
23782            *v = val;
23783        }
23784        __struct.parameter_rc_channel_index = buf.get_u8();
23785        Ok(__struct)
23786    }
23787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23788        let mut __tmp = BytesMut::new(bytes);
23789        #[allow(clippy::absurd_extreme_comparisons)]
23790        #[allow(unused_comparisons)]
23791        if __tmp.remaining() < Self::ENCODED_LEN {
23792            panic!(
23793                "buffer is too small (need {} bytes, but got {})",
23794                Self::ENCODED_LEN,
23795                __tmp.remaining(),
23796            )
23797        }
23798        __tmp.put_f32_le(self.param_value0);
23799        __tmp.put_f32_le(self.scale);
23800        __tmp.put_f32_le(self.param_value_min);
23801        __tmp.put_f32_le(self.param_value_max);
23802        __tmp.put_i16_le(self.param_index);
23803        __tmp.put_u8(self.target_system);
23804        __tmp.put_u8(self.target_component);
23805        for val in &self.param_id {
23806            __tmp.put_u8(*val);
23807        }
23808        __tmp.put_u8(self.parameter_rc_channel_index);
23809        if matches!(version, MavlinkVersion::V2) {
23810            let len = __tmp.len();
23811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23812        } else {
23813            __tmp.len()
23814        }
23815    }
23816}
23817#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23818#[doc = ""]
23819#[doc = "ID: 21"]
23820#[derive(Debug, Clone, PartialEq)]
23821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23823#[cfg_attr(feature = "ts", derive(TS))]
23824#[cfg_attr(feature = "ts", ts(export))]
23825pub struct PARAM_REQUEST_LIST_DATA {
23826    #[doc = "System ID"]
23827    pub target_system: u8,
23828    #[doc = "Component ID"]
23829    pub target_component: u8,
23830}
23831impl PARAM_REQUEST_LIST_DATA {
23832    pub const ENCODED_LEN: usize = 2usize;
23833    pub const DEFAULT: Self = Self {
23834        target_system: 0_u8,
23835        target_component: 0_u8,
23836    };
23837    #[cfg(feature = "arbitrary")]
23838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23839        use arbitrary::{Arbitrary, Unstructured};
23840        let mut buf = [0u8; 1024];
23841        rng.fill_bytes(&mut buf);
23842        let mut unstructured = Unstructured::new(&buf);
23843        Self::arbitrary(&mut unstructured).unwrap_or_default()
23844    }
23845}
23846impl Default for PARAM_REQUEST_LIST_DATA {
23847    fn default() -> Self {
23848        Self::DEFAULT.clone()
23849    }
23850}
23851impl MessageData for PARAM_REQUEST_LIST_DATA {
23852    type Message = MavMessage;
23853    const ID: u32 = 21u32;
23854    const NAME: &'static str = "PARAM_REQUEST_LIST";
23855    const EXTRA_CRC: u8 = 159u8;
23856    const ENCODED_LEN: usize = 2usize;
23857    fn deser(
23858        _version: MavlinkVersion,
23859        __input: &[u8],
23860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23861        let avail_len = __input.len();
23862        let mut payload_buf = [0; Self::ENCODED_LEN];
23863        let mut buf = if avail_len < Self::ENCODED_LEN {
23864            payload_buf[0..avail_len].copy_from_slice(__input);
23865            Bytes::new(&payload_buf)
23866        } else {
23867            Bytes::new(__input)
23868        };
23869        let mut __struct = Self::default();
23870        __struct.target_system = buf.get_u8();
23871        __struct.target_component = buf.get_u8();
23872        Ok(__struct)
23873    }
23874    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23875        let mut __tmp = BytesMut::new(bytes);
23876        #[allow(clippy::absurd_extreme_comparisons)]
23877        #[allow(unused_comparisons)]
23878        if __tmp.remaining() < Self::ENCODED_LEN {
23879            panic!(
23880                "buffer is too small (need {} bytes, but got {})",
23881                Self::ENCODED_LEN,
23882                __tmp.remaining(),
23883            )
23884        }
23885        __tmp.put_u8(self.target_system);
23886        __tmp.put_u8(self.target_component);
23887        if matches!(version, MavlinkVersion::V2) {
23888            let len = __tmp.len();
23889            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23890        } else {
23891            __tmp.len()
23892        }
23893    }
23894}
23895#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23896#[doc = ""]
23897#[doc = "ID: 20"]
23898#[derive(Debug, Clone, PartialEq)]
23899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23901#[cfg_attr(feature = "ts", derive(TS))]
23902#[cfg_attr(feature = "ts", ts(export))]
23903pub struct PARAM_REQUEST_READ_DATA {
23904    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23905    pub param_index: i16,
23906    #[doc = "System ID"]
23907    pub target_system: u8,
23908    #[doc = "Component ID"]
23909    pub target_component: u8,
23910    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23911    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23912    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23913    pub param_id: [u8; 16],
23914}
23915impl PARAM_REQUEST_READ_DATA {
23916    pub const ENCODED_LEN: usize = 20usize;
23917    pub const DEFAULT: Self = Self {
23918        param_index: 0_i16,
23919        target_system: 0_u8,
23920        target_component: 0_u8,
23921        param_id: [0_u8; 16usize],
23922    };
23923    #[cfg(feature = "arbitrary")]
23924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23925        use arbitrary::{Arbitrary, Unstructured};
23926        let mut buf = [0u8; 1024];
23927        rng.fill_bytes(&mut buf);
23928        let mut unstructured = Unstructured::new(&buf);
23929        Self::arbitrary(&mut unstructured).unwrap_or_default()
23930    }
23931}
23932impl Default for PARAM_REQUEST_READ_DATA {
23933    fn default() -> Self {
23934        Self::DEFAULT.clone()
23935    }
23936}
23937impl MessageData for PARAM_REQUEST_READ_DATA {
23938    type Message = MavMessage;
23939    const ID: u32 = 20u32;
23940    const NAME: &'static str = "PARAM_REQUEST_READ";
23941    const EXTRA_CRC: u8 = 214u8;
23942    const ENCODED_LEN: usize = 20usize;
23943    fn deser(
23944        _version: MavlinkVersion,
23945        __input: &[u8],
23946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23947        let avail_len = __input.len();
23948        let mut payload_buf = [0; Self::ENCODED_LEN];
23949        let mut buf = if avail_len < Self::ENCODED_LEN {
23950            payload_buf[0..avail_len].copy_from_slice(__input);
23951            Bytes::new(&payload_buf)
23952        } else {
23953            Bytes::new(__input)
23954        };
23955        let mut __struct = Self::default();
23956        __struct.param_index = buf.get_i16_le();
23957        __struct.target_system = buf.get_u8();
23958        __struct.target_component = buf.get_u8();
23959        for v in &mut __struct.param_id {
23960            let val = buf.get_u8();
23961            *v = val;
23962        }
23963        Ok(__struct)
23964    }
23965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23966        let mut __tmp = BytesMut::new(bytes);
23967        #[allow(clippy::absurd_extreme_comparisons)]
23968        #[allow(unused_comparisons)]
23969        if __tmp.remaining() < Self::ENCODED_LEN {
23970            panic!(
23971                "buffer is too small (need {} bytes, but got {})",
23972                Self::ENCODED_LEN,
23973                __tmp.remaining(),
23974            )
23975        }
23976        __tmp.put_i16_le(self.param_index);
23977        __tmp.put_u8(self.target_system);
23978        __tmp.put_u8(self.target_component);
23979        for val in &self.param_id {
23980            __tmp.put_u8(*val);
23981        }
23982        if matches!(version, MavlinkVersion::V2) {
23983            let len = __tmp.len();
23984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23985        } else {
23986            __tmp.len()
23987        }
23988    }
23989}
23990#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23991#[doc = ""]
23992#[doc = "ID: 23"]
23993#[derive(Debug, Clone, PartialEq)]
23994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23996#[cfg_attr(feature = "ts", derive(TS))]
23997#[cfg_attr(feature = "ts", ts(export))]
23998pub struct PARAM_SET_DATA {
23999    #[doc = "Onboard parameter value"]
24000    pub param_value: f32,
24001    #[doc = "System ID"]
24002    pub target_system: u8,
24003    #[doc = "Component ID"]
24004    pub target_component: u8,
24005    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24008    pub param_id: [u8; 16],
24009    #[doc = "Onboard parameter type."]
24010    pub param_type: MavParamType,
24011}
24012impl PARAM_SET_DATA {
24013    pub const ENCODED_LEN: usize = 23usize;
24014    pub const DEFAULT: Self = Self {
24015        param_value: 0.0_f32,
24016        target_system: 0_u8,
24017        target_component: 0_u8,
24018        param_id: [0_u8; 16usize],
24019        param_type: MavParamType::DEFAULT,
24020    };
24021    #[cfg(feature = "arbitrary")]
24022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24023        use arbitrary::{Arbitrary, Unstructured};
24024        let mut buf = [0u8; 1024];
24025        rng.fill_bytes(&mut buf);
24026        let mut unstructured = Unstructured::new(&buf);
24027        Self::arbitrary(&mut unstructured).unwrap_or_default()
24028    }
24029}
24030impl Default for PARAM_SET_DATA {
24031    fn default() -> Self {
24032        Self::DEFAULT.clone()
24033    }
24034}
24035impl MessageData for PARAM_SET_DATA {
24036    type Message = MavMessage;
24037    const ID: u32 = 23u32;
24038    const NAME: &'static str = "PARAM_SET";
24039    const EXTRA_CRC: u8 = 168u8;
24040    const ENCODED_LEN: usize = 23usize;
24041    fn deser(
24042        _version: MavlinkVersion,
24043        __input: &[u8],
24044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24045        let avail_len = __input.len();
24046        let mut payload_buf = [0; Self::ENCODED_LEN];
24047        let mut buf = if avail_len < Self::ENCODED_LEN {
24048            payload_buf[0..avail_len].copy_from_slice(__input);
24049            Bytes::new(&payload_buf)
24050        } else {
24051            Bytes::new(__input)
24052        };
24053        let mut __struct = Self::default();
24054        __struct.param_value = buf.get_f32_le();
24055        __struct.target_system = buf.get_u8();
24056        __struct.target_component = buf.get_u8();
24057        for v in &mut __struct.param_id {
24058            let val = buf.get_u8();
24059            *v = val;
24060        }
24061        let tmp = buf.get_u8();
24062        __struct.param_type =
24063            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24064                enum_type: "MavParamType",
24065                value: tmp as u32,
24066            })?;
24067        Ok(__struct)
24068    }
24069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24070        let mut __tmp = BytesMut::new(bytes);
24071        #[allow(clippy::absurd_extreme_comparisons)]
24072        #[allow(unused_comparisons)]
24073        if __tmp.remaining() < Self::ENCODED_LEN {
24074            panic!(
24075                "buffer is too small (need {} bytes, but got {})",
24076                Self::ENCODED_LEN,
24077                __tmp.remaining(),
24078            )
24079        }
24080        __tmp.put_f32_le(self.param_value);
24081        __tmp.put_u8(self.target_system);
24082        __tmp.put_u8(self.target_component);
24083        for val in &self.param_id {
24084            __tmp.put_u8(*val);
24085        }
24086        __tmp.put_u8(self.param_type as u8);
24087        if matches!(version, MavlinkVersion::V2) {
24088            let len = __tmp.len();
24089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24090        } else {
24091            __tmp.len()
24092        }
24093    }
24094}
24095#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24096#[doc = ""]
24097#[doc = "ID: 22"]
24098#[derive(Debug, Clone, PartialEq)]
24099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24101#[cfg_attr(feature = "ts", derive(TS))]
24102#[cfg_attr(feature = "ts", ts(export))]
24103pub struct PARAM_VALUE_DATA {
24104    #[doc = "Onboard parameter value"]
24105    pub param_value: f32,
24106    #[doc = "Total number of onboard parameters"]
24107    pub param_count: u16,
24108    #[doc = "Index of this onboard parameter"]
24109    pub param_index: u16,
24110    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24113    pub param_id: [u8; 16],
24114    #[doc = "Onboard parameter type."]
24115    pub param_type: MavParamType,
24116}
24117impl PARAM_VALUE_DATA {
24118    pub const ENCODED_LEN: usize = 25usize;
24119    pub const DEFAULT: Self = Self {
24120        param_value: 0.0_f32,
24121        param_count: 0_u16,
24122        param_index: 0_u16,
24123        param_id: [0_u8; 16usize],
24124        param_type: MavParamType::DEFAULT,
24125    };
24126    #[cfg(feature = "arbitrary")]
24127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24128        use arbitrary::{Arbitrary, Unstructured};
24129        let mut buf = [0u8; 1024];
24130        rng.fill_bytes(&mut buf);
24131        let mut unstructured = Unstructured::new(&buf);
24132        Self::arbitrary(&mut unstructured).unwrap_or_default()
24133    }
24134}
24135impl Default for PARAM_VALUE_DATA {
24136    fn default() -> Self {
24137        Self::DEFAULT.clone()
24138    }
24139}
24140impl MessageData for PARAM_VALUE_DATA {
24141    type Message = MavMessage;
24142    const ID: u32 = 22u32;
24143    const NAME: &'static str = "PARAM_VALUE";
24144    const EXTRA_CRC: u8 = 220u8;
24145    const ENCODED_LEN: usize = 25usize;
24146    fn deser(
24147        _version: MavlinkVersion,
24148        __input: &[u8],
24149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24150        let avail_len = __input.len();
24151        let mut payload_buf = [0; Self::ENCODED_LEN];
24152        let mut buf = if avail_len < Self::ENCODED_LEN {
24153            payload_buf[0..avail_len].copy_from_slice(__input);
24154            Bytes::new(&payload_buf)
24155        } else {
24156            Bytes::new(__input)
24157        };
24158        let mut __struct = Self::default();
24159        __struct.param_value = buf.get_f32_le();
24160        __struct.param_count = buf.get_u16_le();
24161        __struct.param_index = buf.get_u16_le();
24162        for v in &mut __struct.param_id {
24163            let val = buf.get_u8();
24164            *v = val;
24165        }
24166        let tmp = buf.get_u8();
24167        __struct.param_type =
24168            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24169                enum_type: "MavParamType",
24170                value: tmp as u32,
24171            })?;
24172        Ok(__struct)
24173    }
24174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24175        let mut __tmp = BytesMut::new(bytes);
24176        #[allow(clippy::absurd_extreme_comparisons)]
24177        #[allow(unused_comparisons)]
24178        if __tmp.remaining() < Self::ENCODED_LEN {
24179            panic!(
24180                "buffer is too small (need {} bytes, but got {})",
24181                Self::ENCODED_LEN,
24182                __tmp.remaining(),
24183            )
24184        }
24185        __tmp.put_f32_le(self.param_value);
24186        __tmp.put_u16_le(self.param_count);
24187        __tmp.put_u16_le(self.param_index);
24188        for val in &self.param_id {
24189            __tmp.put_u8(*val);
24190        }
24191        __tmp.put_u8(self.param_type as u8);
24192        if matches!(version, MavlinkVersion::V2) {
24193            let len = __tmp.len();
24194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24195        } else {
24196            __tmp.len()
24197        }
24198    }
24199}
24200#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24201#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24202#[doc = ""]
24203#[doc = "ID: 4"]
24204#[derive(Debug, Clone, PartialEq)]
24205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24207#[cfg_attr(feature = "ts", derive(TS))]
24208#[cfg_attr(feature = "ts", ts(export))]
24209pub struct PING_DATA {
24210    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24211    pub time_usec: u64,
24212    #[doc = "PING sequence"]
24213    pub seq: u32,
24214    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24215    pub target_system: u8,
24216    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24217    pub target_component: u8,
24218}
24219impl PING_DATA {
24220    pub const ENCODED_LEN: usize = 14usize;
24221    pub const DEFAULT: Self = Self {
24222        time_usec: 0_u64,
24223        seq: 0_u32,
24224        target_system: 0_u8,
24225        target_component: 0_u8,
24226    };
24227    #[cfg(feature = "arbitrary")]
24228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24229        use arbitrary::{Arbitrary, Unstructured};
24230        let mut buf = [0u8; 1024];
24231        rng.fill_bytes(&mut buf);
24232        let mut unstructured = Unstructured::new(&buf);
24233        Self::arbitrary(&mut unstructured).unwrap_or_default()
24234    }
24235}
24236impl Default for PING_DATA {
24237    fn default() -> Self {
24238        Self::DEFAULT.clone()
24239    }
24240}
24241impl MessageData for PING_DATA {
24242    type Message = MavMessage;
24243    const ID: u32 = 4u32;
24244    const NAME: &'static str = "PING";
24245    const EXTRA_CRC: u8 = 237u8;
24246    const ENCODED_LEN: usize = 14usize;
24247    fn deser(
24248        _version: MavlinkVersion,
24249        __input: &[u8],
24250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24251        let avail_len = __input.len();
24252        let mut payload_buf = [0; Self::ENCODED_LEN];
24253        let mut buf = if avail_len < Self::ENCODED_LEN {
24254            payload_buf[0..avail_len].copy_from_slice(__input);
24255            Bytes::new(&payload_buf)
24256        } else {
24257            Bytes::new(__input)
24258        };
24259        let mut __struct = Self::default();
24260        __struct.time_usec = buf.get_u64_le();
24261        __struct.seq = buf.get_u32_le();
24262        __struct.target_system = buf.get_u8();
24263        __struct.target_component = buf.get_u8();
24264        Ok(__struct)
24265    }
24266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24267        let mut __tmp = BytesMut::new(bytes);
24268        #[allow(clippy::absurd_extreme_comparisons)]
24269        #[allow(unused_comparisons)]
24270        if __tmp.remaining() < Self::ENCODED_LEN {
24271            panic!(
24272                "buffer is too small (need {} bytes, but got {})",
24273                Self::ENCODED_LEN,
24274                __tmp.remaining(),
24275            )
24276        }
24277        __tmp.put_u64_le(self.time_usec);
24278        __tmp.put_u32_le(self.seq);
24279        __tmp.put_u8(self.target_system);
24280        __tmp.put_u8(self.target_component);
24281        if matches!(version, MavlinkVersion::V2) {
24282            let len = __tmp.len();
24283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24284        } else {
24285            __tmp.len()
24286        }
24287    }
24288}
24289#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24290#[doc = "Control vehicle tone generation (buzzer)."]
24291#[doc = ""]
24292#[doc = "ID: 258"]
24293#[derive(Debug, Clone, PartialEq)]
24294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24296#[cfg_attr(feature = "ts", derive(TS))]
24297#[cfg_attr(feature = "ts", ts(export))]
24298pub struct PLAY_TUNE_DATA {
24299    #[doc = "System ID"]
24300    pub target_system: u8,
24301    #[doc = "Component ID"]
24302    pub target_component: u8,
24303    #[doc = "tune in board specific format"]
24304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24305    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24306    pub tune: [u8; 30],
24307    #[doc = "tune extension (appended to tune)"]
24308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24310    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24311    pub tune2: [u8; 200],
24312}
24313impl PLAY_TUNE_DATA {
24314    pub const ENCODED_LEN: usize = 232usize;
24315    pub const DEFAULT: Self = Self {
24316        target_system: 0_u8,
24317        target_component: 0_u8,
24318        tune: [0_u8; 30usize],
24319        tune2: [0_u8; 200usize],
24320    };
24321    #[cfg(feature = "arbitrary")]
24322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24323        use arbitrary::{Arbitrary, Unstructured};
24324        let mut buf = [0u8; 1024];
24325        rng.fill_bytes(&mut buf);
24326        let mut unstructured = Unstructured::new(&buf);
24327        Self::arbitrary(&mut unstructured).unwrap_or_default()
24328    }
24329}
24330impl Default for PLAY_TUNE_DATA {
24331    fn default() -> Self {
24332        Self::DEFAULT.clone()
24333    }
24334}
24335impl MessageData for PLAY_TUNE_DATA {
24336    type Message = MavMessage;
24337    const ID: u32 = 258u32;
24338    const NAME: &'static str = "PLAY_TUNE";
24339    const EXTRA_CRC: u8 = 187u8;
24340    const ENCODED_LEN: usize = 232usize;
24341    fn deser(
24342        _version: MavlinkVersion,
24343        __input: &[u8],
24344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24345        let avail_len = __input.len();
24346        let mut payload_buf = [0; Self::ENCODED_LEN];
24347        let mut buf = if avail_len < Self::ENCODED_LEN {
24348            payload_buf[0..avail_len].copy_from_slice(__input);
24349            Bytes::new(&payload_buf)
24350        } else {
24351            Bytes::new(__input)
24352        };
24353        let mut __struct = Self::default();
24354        __struct.target_system = buf.get_u8();
24355        __struct.target_component = buf.get_u8();
24356        for v in &mut __struct.tune {
24357            let val = buf.get_u8();
24358            *v = val;
24359        }
24360        for v in &mut __struct.tune2 {
24361            let val = buf.get_u8();
24362            *v = val;
24363        }
24364        Ok(__struct)
24365    }
24366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24367        let mut __tmp = BytesMut::new(bytes);
24368        #[allow(clippy::absurd_extreme_comparisons)]
24369        #[allow(unused_comparisons)]
24370        if __tmp.remaining() < Self::ENCODED_LEN {
24371            panic!(
24372                "buffer is too small (need {} bytes, but got {})",
24373                Self::ENCODED_LEN,
24374                __tmp.remaining(),
24375            )
24376        }
24377        __tmp.put_u8(self.target_system);
24378        __tmp.put_u8(self.target_component);
24379        for val in &self.tune {
24380            __tmp.put_u8(*val);
24381        }
24382        if matches!(version, MavlinkVersion::V2) {
24383            for val in &self.tune2 {
24384                __tmp.put_u8(*val);
24385            }
24386            let len = __tmp.len();
24387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24388        } else {
24389            __tmp.len()
24390        }
24391    }
24392}
24393#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24394#[doc = ""]
24395#[doc = "ID: 400"]
24396#[derive(Debug, Clone, PartialEq)]
24397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24399#[cfg_attr(feature = "ts", derive(TS))]
24400#[cfg_attr(feature = "ts", ts(export))]
24401pub struct PLAY_TUNE_V2_DATA {
24402    #[doc = "Tune format"]
24403    pub format: TuneFormat,
24404    #[doc = "System ID"]
24405    pub target_system: u8,
24406    #[doc = "Component ID"]
24407    pub target_component: u8,
24408    #[doc = "Tune definition as a NULL-terminated string."]
24409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24410    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24411    pub tune: [u8; 248],
24412}
24413impl PLAY_TUNE_V2_DATA {
24414    pub const ENCODED_LEN: usize = 254usize;
24415    pub const DEFAULT: Self = Self {
24416        format: TuneFormat::DEFAULT,
24417        target_system: 0_u8,
24418        target_component: 0_u8,
24419        tune: [0_u8; 248usize],
24420    };
24421    #[cfg(feature = "arbitrary")]
24422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24423        use arbitrary::{Arbitrary, Unstructured};
24424        let mut buf = [0u8; 1024];
24425        rng.fill_bytes(&mut buf);
24426        let mut unstructured = Unstructured::new(&buf);
24427        Self::arbitrary(&mut unstructured).unwrap_or_default()
24428    }
24429}
24430impl Default for PLAY_TUNE_V2_DATA {
24431    fn default() -> Self {
24432        Self::DEFAULT.clone()
24433    }
24434}
24435impl MessageData for PLAY_TUNE_V2_DATA {
24436    type Message = MavMessage;
24437    const ID: u32 = 400u32;
24438    const NAME: &'static str = "PLAY_TUNE_V2";
24439    const EXTRA_CRC: u8 = 110u8;
24440    const ENCODED_LEN: usize = 254usize;
24441    fn deser(
24442        _version: MavlinkVersion,
24443        __input: &[u8],
24444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24445        let avail_len = __input.len();
24446        let mut payload_buf = [0; Self::ENCODED_LEN];
24447        let mut buf = if avail_len < Self::ENCODED_LEN {
24448            payload_buf[0..avail_len].copy_from_slice(__input);
24449            Bytes::new(&payload_buf)
24450        } else {
24451            Bytes::new(__input)
24452        };
24453        let mut __struct = Self::default();
24454        let tmp = buf.get_u32_le();
24455        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24456            ::mavlink_core::error::ParserError::InvalidEnum {
24457                enum_type: "TuneFormat",
24458                value: tmp as u32,
24459            },
24460        )?;
24461        __struct.target_system = buf.get_u8();
24462        __struct.target_component = buf.get_u8();
24463        for v in &mut __struct.tune {
24464            let val = buf.get_u8();
24465            *v = val;
24466        }
24467        Ok(__struct)
24468    }
24469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24470        let mut __tmp = BytesMut::new(bytes);
24471        #[allow(clippy::absurd_extreme_comparisons)]
24472        #[allow(unused_comparisons)]
24473        if __tmp.remaining() < Self::ENCODED_LEN {
24474            panic!(
24475                "buffer is too small (need {} bytes, but got {})",
24476                Self::ENCODED_LEN,
24477                __tmp.remaining(),
24478            )
24479        }
24480        __tmp.put_u32_le(self.format as u32);
24481        __tmp.put_u8(self.target_system);
24482        __tmp.put_u8(self.target_component);
24483        for val in &self.tune {
24484            __tmp.put_u8(*val);
24485        }
24486        if matches!(version, MavlinkVersion::V2) {
24487            let len = __tmp.len();
24488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24489        } else {
24490            __tmp.len()
24491        }
24492    }
24493}
24494#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24495#[doc = ""]
24496#[doc = "ID: 87"]
24497#[derive(Debug, Clone, PartialEq)]
24498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24500#[cfg_attr(feature = "ts", derive(TS))]
24501#[cfg_attr(feature = "ts", ts(export))]
24502pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24503    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24504    pub time_boot_ms: u32,
24505    #[doc = "Latitude in WGS84 frame"]
24506    pub lat_int: i32,
24507    #[doc = "Longitude in WGS84 frame"]
24508    pub lon_int: i32,
24509    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24510    pub alt: f32,
24511    #[doc = "X velocity in NED frame"]
24512    pub vx: f32,
24513    #[doc = "Y velocity in NED frame"]
24514    pub vy: f32,
24515    #[doc = "Z velocity in NED frame"]
24516    pub vz: f32,
24517    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24518    pub afx: f32,
24519    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24520    pub afy: f32,
24521    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24522    pub afz: f32,
24523    #[doc = "yaw setpoint"]
24524    pub yaw: f32,
24525    #[doc = "yaw rate setpoint"]
24526    pub yaw_rate: f32,
24527    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24528    pub type_mask: PositionTargetTypemask,
24529    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24530    pub coordinate_frame: MavFrame,
24531}
24532impl POSITION_TARGET_GLOBAL_INT_DATA {
24533    pub const ENCODED_LEN: usize = 51usize;
24534    pub const DEFAULT: Self = Self {
24535        time_boot_ms: 0_u32,
24536        lat_int: 0_i32,
24537        lon_int: 0_i32,
24538        alt: 0.0_f32,
24539        vx: 0.0_f32,
24540        vy: 0.0_f32,
24541        vz: 0.0_f32,
24542        afx: 0.0_f32,
24543        afy: 0.0_f32,
24544        afz: 0.0_f32,
24545        yaw: 0.0_f32,
24546        yaw_rate: 0.0_f32,
24547        type_mask: PositionTargetTypemask::DEFAULT,
24548        coordinate_frame: MavFrame::DEFAULT,
24549    };
24550    #[cfg(feature = "arbitrary")]
24551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24552        use arbitrary::{Arbitrary, Unstructured};
24553        let mut buf = [0u8; 1024];
24554        rng.fill_bytes(&mut buf);
24555        let mut unstructured = Unstructured::new(&buf);
24556        Self::arbitrary(&mut unstructured).unwrap_or_default()
24557    }
24558}
24559impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24560    fn default() -> Self {
24561        Self::DEFAULT.clone()
24562    }
24563}
24564impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24565    type Message = MavMessage;
24566    const ID: u32 = 87u32;
24567    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24568    const EXTRA_CRC: u8 = 150u8;
24569    const ENCODED_LEN: usize = 51usize;
24570    fn deser(
24571        _version: MavlinkVersion,
24572        __input: &[u8],
24573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24574        let avail_len = __input.len();
24575        let mut payload_buf = [0; Self::ENCODED_LEN];
24576        let mut buf = if avail_len < Self::ENCODED_LEN {
24577            payload_buf[0..avail_len].copy_from_slice(__input);
24578            Bytes::new(&payload_buf)
24579        } else {
24580            Bytes::new(__input)
24581        };
24582        let mut __struct = Self::default();
24583        __struct.time_boot_ms = buf.get_u32_le();
24584        __struct.lat_int = buf.get_i32_le();
24585        __struct.lon_int = buf.get_i32_le();
24586        __struct.alt = buf.get_f32_le();
24587        __struct.vx = buf.get_f32_le();
24588        __struct.vy = buf.get_f32_le();
24589        __struct.vz = buf.get_f32_le();
24590        __struct.afx = buf.get_f32_le();
24591        __struct.afy = buf.get_f32_le();
24592        __struct.afz = buf.get_f32_le();
24593        __struct.yaw = buf.get_f32_le();
24594        __struct.yaw_rate = buf.get_f32_le();
24595        let tmp = buf.get_u16_le();
24596        __struct.type_mask = PositionTargetTypemask::from_bits(
24597            tmp & PositionTargetTypemask::all().bits(),
24598        )
24599        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24600            flag_type: "PositionTargetTypemask",
24601            value: tmp as u32,
24602        })?;
24603        let tmp = buf.get_u8();
24604        __struct.coordinate_frame =
24605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24606                enum_type: "MavFrame",
24607                value: tmp as u32,
24608            })?;
24609        Ok(__struct)
24610    }
24611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24612        let mut __tmp = BytesMut::new(bytes);
24613        #[allow(clippy::absurd_extreme_comparisons)]
24614        #[allow(unused_comparisons)]
24615        if __tmp.remaining() < Self::ENCODED_LEN {
24616            panic!(
24617                "buffer is too small (need {} bytes, but got {})",
24618                Self::ENCODED_LEN,
24619                __tmp.remaining(),
24620            )
24621        }
24622        __tmp.put_u32_le(self.time_boot_ms);
24623        __tmp.put_i32_le(self.lat_int);
24624        __tmp.put_i32_le(self.lon_int);
24625        __tmp.put_f32_le(self.alt);
24626        __tmp.put_f32_le(self.vx);
24627        __tmp.put_f32_le(self.vy);
24628        __tmp.put_f32_le(self.vz);
24629        __tmp.put_f32_le(self.afx);
24630        __tmp.put_f32_le(self.afy);
24631        __tmp.put_f32_le(self.afz);
24632        __tmp.put_f32_le(self.yaw);
24633        __tmp.put_f32_le(self.yaw_rate);
24634        __tmp.put_u16_le(self.type_mask.bits());
24635        __tmp.put_u8(self.coordinate_frame as u8);
24636        if matches!(version, MavlinkVersion::V2) {
24637            let len = __tmp.len();
24638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24639        } else {
24640            __tmp.len()
24641        }
24642    }
24643}
24644#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24645#[doc = ""]
24646#[doc = "ID: 85"]
24647#[derive(Debug, Clone, PartialEq)]
24648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24650#[cfg_attr(feature = "ts", derive(TS))]
24651#[cfg_attr(feature = "ts", ts(export))]
24652pub struct POSITION_TARGET_LOCAL_NED_DATA {
24653    #[doc = "Timestamp (time since system boot)."]
24654    pub time_boot_ms: u32,
24655    #[doc = "X Position in NED frame"]
24656    pub x: f32,
24657    #[doc = "Y Position in NED frame"]
24658    pub y: f32,
24659    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24660    pub z: f32,
24661    #[doc = "X velocity in NED frame"]
24662    pub vx: f32,
24663    #[doc = "Y velocity in NED frame"]
24664    pub vy: f32,
24665    #[doc = "Z velocity in NED frame"]
24666    pub vz: f32,
24667    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24668    pub afx: f32,
24669    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24670    pub afy: f32,
24671    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24672    pub afz: f32,
24673    #[doc = "yaw setpoint"]
24674    pub yaw: f32,
24675    #[doc = "yaw rate setpoint"]
24676    pub yaw_rate: f32,
24677    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24678    pub type_mask: PositionTargetTypemask,
24679    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24680    pub coordinate_frame: MavFrame,
24681}
24682impl POSITION_TARGET_LOCAL_NED_DATA {
24683    pub const ENCODED_LEN: usize = 51usize;
24684    pub const DEFAULT: Self = Self {
24685        time_boot_ms: 0_u32,
24686        x: 0.0_f32,
24687        y: 0.0_f32,
24688        z: 0.0_f32,
24689        vx: 0.0_f32,
24690        vy: 0.0_f32,
24691        vz: 0.0_f32,
24692        afx: 0.0_f32,
24693        afy: 0.0_f32,
24694        afz: 0.0_f32,
24695        yaw: 0.0_f32,
24696        yaw_rate: 0.0_f32,
24697        type_mask: PositionTargetTypemask::DEFAULT,
24698        coordinate_frame: MavFrame::DEFAULT,
24699    };
24700    #[cfg(feature = "arbitrary")]
24701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24702        use arbitrary::{Arbitrary, Unstructured};
24703        let mut buf = [0u8; 1024];
24704        rng.fill_bytes(&mut buf);
24705        let mut unstructured = Unstructured::new(&buf);
24706        Self::arbitrary(&mut unstructured).unwrap_or_default()
24707    }
24708}
24709impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24710    fn default() -> Self {
24711        Self::DEFAULT.clone()
24712    }
24713}
24714impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24715    type Message = MavMessage;
24716    const ID: u32 = 85u32;
24717    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24718    const EXTRA_CRC: u8 = 140u8;
24719    const ENCODED_LEN: usize = 51usize;
24720    fn deser(
24721        _version: MavlinkVersion,
24722        __input: &[u8],
24723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24724        let avail_len = __input.len();
24725        let mut payload_buf = [0; Self::ENCODED_LEN];
24726        let mut buf = if avail_len < Self::ENCODED_LEN {
24727            payload_buf[0..avail_len].copy_from_slice(__input);
24728            Bytes::new(&payload_buf)
24729        } else {
24730            Bytes::new(__input)
24731        };
24732        let mut __struct = Self::default();
24733        __struct.time_boot_ms = buf.get_u32_le();
24734        __struct.x = buf.get_f32_le();
24735        __struct.y = buf.get_f32_le();
24736        __struct.z = buf.get_f32_le();
24737        __struct.vx = buf.get_f32_le();
24738        __struct.vy = buf.get_f32_le();
24739        __struct.vz = buf.get_f32_le();
24740        __struct.afx = buf.get_f32_le();
24741        __struct.afy = buf.get_f32_le();
24742        __struct.afz = buf.get_f32_le();
24743        __struct.yaw = buf.get_f32_le();
24744        __struct.yaw_rate = buf.get_f32_le();
24745        let tmp = buf.get_u16_le();
24746        __struct.type_mask = PositionTargetTypemask::from_bits(
24747            tmp & PositionTargetTypemask::all().bits(),
24748        )
24749        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24750            flag_type: "PositionTargetTypemask",
24751            value: tmp as u32,
24752        })?;
24753        let tmp = buf.get_u8();
24754        __struct.coordinate_frame =
24755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24756                enum_type: "MavFrame",
24757                value: tmp as u32,
24758            })?;
24759        Ok(__struct)
24760    }
24761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24762        let mut __tmp = BytesMut::new(bytes);
24763        #[allow(clippy::absurd_extreme_comparisons)]
24764        #[allow(unused_comparisons)]
24765        if __tmp.remaining() < Self::ENCODED_LEN {
24766            panic!(
24767                "buffer is too small (need {} bytes, but got {})",
24768                Self::ENCODED_LEN,
24769                __tmp.remaining(),
24770            )
24771        }
24772        __tmp.put_u32_le(self.time_boot_ms);
24773        __tmp.put_f32_le(self.x);
24774        __tmp.put_f32_le(self.y);
24775        __tmp.put_f32_le(self.z);
24776        __tmp.put_f32_le(self.vx);
24777        __tmp.put_f32_le(self.vy);
24778        __tmp.put_f32_le(self.vz);
24779        __tmp.put_f32_le(self.afx);
24780        __tmp.put_f32_le(self.afy);
24781        __tmp.put_f32_le(self.afz);
24782        __tmp.put_f32_le(self.yaw);
24783        __tmp.put_f32_le(self.yaw_rate);
24784        __tmp.put_u16_le(self.type_mask.bits());
24785        __tmp.put_u8(self.coordinate_frame as u8);
24786        if matches!(version, MavlinkVersion::V2) {
24787            let len = __tmp.len();
24788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24789        } else {
24790            __tmp.len()
24791        }
24792    }
24793}
24794#[doc = "Power supply status."]
24795#[doc = ""]
24796#[doc = "ID: 125"]
24797#[derive(Debug, Clone, PartialEq)]
24798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24800#[cfg_attr(feature = "ts", derive(TS))]
24801#[cfg_attr(feature = "ts", ts(export))]
24802pub struct POWER_STATUS_DATA {
24803    #[doc = "5V rail voltage."]
24804    pub Vcc: u16,
24805    #[doc = "Servo rail voltage."]
24806    pub Vservo: u16,
24807    #[doc = "Bitmap of power supply status flags."]
24808    pub flags: MavPowerStatus,
24809}
24810impl POWER_STATUS_DATA {
24811    pub const ENCODED_LEN: usize = 6usize;
24812    pub const DEFAULT: Self = Self {
24813        Vcc: 0_u16,
24814        Vservo: 0_u16,
24815        flags: MavPowerStatus::DEFAULT,
24816    };
24817    #[cfg(feature = "arbitrary")]
24818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24819        use arbitrary::{Arbitrary, Unstructured};
24820        let mut buf = [0u8; 1024];
24821        rng.fill_bytes(&mut buf);
24822        let mut unstructured = Unstructured::new(&buf);
24823        Self::arbitrary(&mut unstructured).unwrap_or_default()
24824    }
24825}
24826impl Default for POWER_STATUS_DATA {
24827    fn default() -> Self {
24828        Self::DEFAULT.clone()
24829    }
24830}
24831impl MessageData for POWER_STATUS_DATA {
24832    type Message = MavMessage;
24833    const ID: u32 = 125u32;
24834    const NAME: &'static str = "POWER_STATUS";
24835    const EXTRA_CRC: u8 = 203u8;
24836    const ENCODED_LEN: usize = 6usize;
24837    fn deser(
24838        _version: MavlinkVersion,
24839        __input: &[u8],
24840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24841        let avail_len = __input.len();
24842        let mut payload_buf = [0; Self::ENCODED_LEN];
24843        let mut buf = if avail_len < Self::ENCODED_LEN {
24844            payload_buf[0..avail_len].copy_from_slice(__input);
24845            Bytes::new(&payload_buf)
24846        } else {
24847            Bytes::new(__input)
24848        };
24849        let mut __struct = Self::default();
24850        __struct.Vcc = buf.get_u16_le();
24851        __struct.Vservo = buf.get_u16_le();
24852        let tmp = buf.get_u16_le();
24853        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24854            ::mavlink_core::error::ParserError::InvalidFlag {
24855                flag_type: "MavPowerStatus",
24856                value: tmp as u32,
24857            },
24858        )?;
24859        Ok(__struct)
24860    }
24861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24862        let mut __tmp = BytesMut::new(bytes);
24863        #[allow(clippy::absurd_extreme_comparisons)]
24864        #[allow(unused_comparisons)]
24865        if __tmp.remaining() < Self::ENCODED_LEN {
24866            panic!(
24867                "buffer is too small (need {} bytes, but got {})",
24868                Self::ENCODED_LEN,
24869                __tmp.remaining(),
24870            )
24871        }
24872        __tmp.put_u16_le(self.Vcc);
24873        __tmp.put_u16_le(self.Vservo);
24874        __tmp.put_u16_le(self.flags.bits());
24875        if matches!(version, MavlinkVersion::V2) {
24876            let len = __tmp.len();
24877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24878        } else {
24879            __tmp.len()
24880        }
24881    }
24882}
24883#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24884#[doc = ""]
24885#[doc = "ID: 300"]
24886#[derive(Debug, Clone, PartialEq)]
24887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24889#[cfg_attr(feature = "ts", derive(TS))]
24890#[cfg_attr(feature = "ts", ts(export))]
24891pub struct PROTOCOL_VERSION_DATA {
24892    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24893    pub version: u16,
24894    #[doc = "Minimum MAVLink version supported"]
24895    pub min_version: u16,
24896    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24897    pub max_version: u16,
24898    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24899    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24900    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24901    pub spec_version_hash: [u8; 8],
24902    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24904    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24905    pub library_version_hash: [u8; 8],
24906}
24907impl PROTOCOL_VERSION_DATA {
24908    pub const ENCODED_LEN: usize = 22usize;
24909    pub const DEFAULT: Self = Self {
24910        version: 0_u16,
24911        min_version: 0_u16,
24912        max_version: 0_u16,
24913        spec_version_hash: [0_u8; 8usize],
24914        library_version_hash: [0_u8; 8usize],
24915    };
24916    #[cfg(feature = "arbitrary")]
24917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24918        use arbitrary::{Arbitrary, Unstructured};
24919        let mut buf = [0u8; 1024];
24920        rng.fill_bytes(&mut buf);
24921        let mut unstructured = Unstructured::new(&buf);
24922        Self::arbitrary(&mut unstructured).unwrap_or_default()
24923    }
24924}
24925impl Default for PROTOCOL_VERSION_DATA {
24926    fn default() -> Self {
24927        Self::DEFAULT.clone()
24928    }
24929}
24930impl MessageData for PROTOCOL_VERSION_DATA {
24931    type Message = MavMessage;
24932    const ID: u32 = 300u32;
24933    const NAME: &'static str = "PROTOCOL_VERSION";
24934    const EXTRA_CRC: u8 = 217u8;
24935    const ENCODED_LEN: usize = 22usize;
24936    fn deser(
24937        _version: MavlinkVersion,
24938        __input: &[u8],
24939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24940        let avail_len = __input.len();
24941        let mut payload_buf = [0; Self::ENCODED_LEN];
24942        let mut buf = if avail_len < Self::ENCODED_LEN {
24943            payload_buf[0..avail_len].copy_from_slice(__input);
24944            Bytes::new(&payload_buf)
24945        } else {
24946            Bytes::new(__input)
24947        };
24948        let mut __struct = Self::default();
24949        __struct.version = buf.get_u16_le();
24950        __struct.min_version = buf.get_u16_le();
24951        __struct.max_version = buf.get_u16_le();
24952        for v in &mut __struct.spec_version_hash {
24953            let val = buf.get_u8();
24954            *v = val;
24955        }
24956        for v in &mut __struct.library_version_hash {
24957            let val = buf.get_u8();
24958            *v = val;
24959        }
24960        Ok(__struct)
24961    }
24962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24963        let mut __tmp = BytesMut::new(bytes);
24964        #[allow(clippy::absurd_extreme_comparisons)]
24965        #[allow(unused_comparisons)]
24966        if __tmp.remaining() < Self::ENCODED_LEN {
24967            panic!(
24968                "buffer is too small (need {} bytes, but got {})",
24969                Self::ENCODED_LEN,
24970                __tmp.remaining(),
24971            )
24972        }
24973        __tmp.put_u16_le(self.version);
24974        __tmp.put_u16_le(self.min_version);
24975        __tmp.put_u16_le(self.max_version);
24976        for val in &self.spec_version_hash {
24977            __tmp.put_u8(*val);
24978        }
24979        for val in &self.library_version_hash {
24980            __tmp.put_u8(*val);
24981        }
24982        if matches!(version, MavlinkVersion::V2) {
24983            let len = __tmp.len();
24984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24985        } else {
24986            __tmp.len()
24987        }
24988    }
24989}
24990#[doc = "Status generated by radio and injected into MAVLink stream."]
24991#[doc = ""]
24992#[doc = "ID: 109"]
24993#[derive(Debug, Clone, PartialEq)]
24994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24996#[cfg_attr(feature = "ts", derive(TS))]
24997#[cfg_attr(feature = "ts", ts(export))]
24998pub struct RADIO_STATUS_DATA {
24999    #[doc = "Count of radio packet receive errors (since boot)."]
25000    pub rxerrors: u16,
25001    #[doc = "Count of error corrected radio packets (since boot)."]
25002    pub fixed: u16,
25003    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25004    pub rssi: u8,
25005    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25006    pub remrssi: u8,
25007    #[doc = "Remaining free transmitter buffer space."]
25008    pub txbuf: u8,
25009    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25010    pub noise: u8,
25011    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25012    pub remnoise: u8,
25013}
25014impl RADIO_STATUS_DATA {
25015    pub const ENCODED_LEN: usize = 9usize;
25016    pub const DEFAULT: Self = Self {
25017        rxerrors: 0_u16,
25018        fixed: 0_u16,
25019        rssi: 0_u8,
25020        remrssi: 0_u8,
25021        txbuf: 0_u8,
25022        noise: 0_u8,
25023        remnoise: 0_u8,
25024    };
25025    #[cfg(feature = "arbitrary")]
25026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25027        use arbitrary::{Arbitrary, Unstructured};
25028        let mut buf = [0u8; 1024];
25029        rng.fill_bytes(&mut buf);
25030        let mut unstructured = Unstructured::new(&buf);
25031        Self::arbitrary(&mut unstructured).unwrap_or_default()
25032    }
25033}
25034impl Default for RADIO_STATUS_DATA {
25035    fn default() -> Self {
25036        Self::DEFAULT.clone()
25037    }
25038}
25039impl MessageData for RADIO_STATUS_DATA {
25040    type Message = MavMessage;
25041    const ID: u32 = 109u32;
25042    const NAME: &'static str = "RADIO_STATUS";
25043    const EXTRA_CRC: u8 = 185u8;
25044    const ENCODED_LEN: usize = 9usize;
25045    fn deser(
25046        _version: MavlinkVersion,
25047        __input: &[u8],
25048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25049        let avail_len = __input.len();
25050        let mut payload_buf = [0; Self::ENCODED_LEN];
25051        let mut buf = if avail_len < Self::ENCODED_LEN {
25052            payload_buf[0..avail_len].copy_from_slice(__input);
25053            Bytes::new(&payload_buf)
25054        } else {
25055            Bytes::new(__input)
25056        };
25057        let mut __struct = Self::default();
25058        __struct.rxerrors = buf.get_u16_le();
25059        __struct.fixed = buf.get_u16_le();
25060        __struct.rssi = buf.get_u8();
25061        __struct.remrssi = buf.get_u8();
25062        __struct.txbuf = buf.get_u8();
25063        __struct.noise = buf.get_u8();
25064        __struct.remnoise = buf.get_u8();
25065        Ok(__struct)
25066    }
25067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25068        let mut __tmp = BytesMut::new(bytes);
25069        #[allow(clippy::absurd_extreme_comparisons)]
25070        #[allow(unused_comparisons)]
25071        if __tmp.remaining() < Self::ENCODED_LEN {
25072            panic!(
25073                "buffer is too small (need {} bytes, but got {})",
25074                Self::ENCODED_LEN,
25075                __tmp.remaining(),
25076            )
25077        }
25078        __tmp.put_u16_le(self.rxerrors);
25079        __tmp.put_u16_le(self.fixed);
25080        __tmp.put_u8(self.rssi);
25081        __tmp.put_u8(self.remrssi);
25082        __tmp.put_u8(self.txbuf);
25083        __tmp.put_u8(self.noise);
25084        __tmp.put_u8(self.remnoise);
25085        if matches!(version, MavlinkVersion::V2) {
25086            let len = __tmp.len();
25087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25088        } else {
25089            __tmp.len()
25090        }
25091    }
25092}
25093#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25094#[doc = ""]
25095#[doc = "ID: 27"]
25096#[derive(Debug, Clone, PartialEq)]
25097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25099#[cfg_attr(feature = "ts", derive(TS))]
25100#[cfg_attr(feature = "ts", ts(export))]
25101pub struct RAW_IMU_DATA {
25102    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25103    pub time_usec: u64,
25104    #[doc = "X acceleration (raw)"]
25105    pub xacc: i16,
25106    #[doc = "Y acceleration (raw)"]
25107    pub yacc: i16,
25108    #[doc = "Z acceleration (raw)"]
25109    pub zacc: i16,
25110    #[doc = "Angular speed around X axis (raw)"]
25111    pub xgyro: i16,
25112    #[doc = "Angular speed around Y axis (raw)"]
25113    pub ygyro: i16,
25114    #[doc = "Angular speed around Z axis (raw)"]
25115    pub zgyro: i16,
25116    #[doc = "X Magnetic field (raw)"]
25117    pub xmag: i16,
25118    #[doc = "Y Magnetic field (raw)"]
25119    pub ymag: i16,
25120    #[doc = "Z Magnetic field (raw)"]
25121    pub zmag: i16,
25122    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25124    pub id: u8,
25125    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25126    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25127    pub temperature: i16,
25128}
25129impl RAW_IMU_DATA {
25130    pub const ENCODED_LEN: usize = 29usize;
25131    pub const DEFAULT: Self = Self {
25132        time_usec: 0_u64,
25133        xacc: 0_i16,
25134        yacc: 0_i16,
25135        zacc: 0_i16,
25136        xgyro: 0_i16,
25137        ygyro: 0_i16,
25138        zgyro: 0_i16,
25139        xmag: 0_i16,
25140        ymag: 0_i16,
25141        zmag: 0_i16,
25142        id: 0_u8,
25143        temperature: 0_i16,
25144    };
25145    #[cfg(feature = "arbitrary")]
25146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25147        use arbitrary::{Arbitrary, Unstructured};
25148        let mut buf = [0u8; 1024];
25149        rng.fill_bytes(&mut buf);
25150        let mut unstructured = Unstructured::new(&buf);
25151        Self::arbitrary(&mut unstructured).unwrap_or_default()
25152    }
25153}
25154impl Default for RAW_IMU_DATA {
25155    fn default() -> Self {
25156        Self::DEFAULT.clone()
25157    }
25158}
25159impl MessageData for RAW_IMU_DATA {
25160    type Message = MavMessage;
25161    const ID: u32 = 27u32;
25162    const NAME: &'static str = "RAW_IMU";
25163    const EXTRA_CRC: u8 = 144u8;
25164    const ENCODED_LEN: usize = 29usize;
25165    fn deser(
25166        _version: MavlinkVersion,
25167        __input: &[u8],
25168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25169        let avail_len = __input.len();
25170        let mut payload_buf = [0; Self::ENCODED_LEN];
25171        let mut buf = if avail_len < Self::ENCODED_LEN {
25172            payload_buf[0..avail_len].copy_from_slice(__input);
25173            Bytes::new(&payload_buf)
25174        } else {
25175            Bytes::new(__input)
25176        };
25177        let mut __struct = Self::default();
25178        __struct.time_usec = buf.get_u64_le();
25179        __struct.xacc = buf.get_i16_le();
25180        __struct.yacc = buf.get_i16_le();
25181        __struct.zacc = buf.get_i16_le();
25182        __struct.xgyro = buf.get_i16_le();
25183        __struct.ygyro = buf.get_i16_le();
25184        __struct.zgyro = buf.get_i16_le();
25185        __struct.xmag = buf.get_i16_le();
25186        __struct.ymag = buf.get_i16_le();
25187        __struct.zmag = buf.get_i16_le();
25188        __struct.id = buf.get_u8();
25189        __struct.temperature = buf.get_i16_le();
25190        Ok(__struct)
25191    }
25192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25193        let mut __tmp = BytesMut::new(bytes);
25194        #[allow(clippy::absurd_extreme_comparisons)]
25195        #[allow(unused_comparisons)]
25196        if __tmp.remaining() < Self::ENCODED_LEN {
25197            panic!(
25198                "buffer is too small (need {} bytes, but got {})",
25199                Self::ENCODED_LEN,
25200                __tmp.remaining(),
25201            )
25202        }
25203        __tmp.put_u64_le(self.time_usec);
25204        __tmp.put_i16_le(self.xacc);
25205        __tmp.put_i16_le(self.yacc);
25206        __tmp.put_i16_le(self.zacc);
25207        __tmp.put_i16_le(self.xgyro);
25208        __tmp.put_i16_le(self.ygyro);
25209        __tmp.put_i16_le(self.zgyro);
25210        __tmp.put_i16_le(self.xmag);
25211        __tmp.put_i16_le(self.ymag);
25212        __tmp.put_i16_le(self.zmag);
25213        if matches!(version, MavlinkVersion::V2) {
25214            __tmp.put_u8(self.id);
25215            __tmp.put_i16_le(self.temperature);
25216            let len = __tmp.len();
25217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25218        } else {
25219            __tmp.len()
25220        }
25221    }
25222}
25223#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25224#[doc = ""]
25225#[doc = "ID: 28"]
25226#[derive(Debug, Clone, PartialEq)]
25227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25229#[cfg_attr(feature = "ts", derive(TS))]
25230#[cfg_attr(feature = "ts", ts(export))]
25231pub struct RAW_PRESSURE_DATA {
25232    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25233    pub time_usec: u64,
25234    #[doc = "Absolute pressure (raw)"]
25235    pub press_abs: i16,
25236    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25237    pub press_diff1: i16,
25238    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25239    pub press_diff2: i16,
25240    #[doc = "Raw Temperature measurement (raw)"]
25241    pub temperature: i16,
25242}
25243impl RAW_PRESSURE_DATA {
25244    pub const ENCODED_LEN: usize = 16usize;
25245    pub const DEFAULT: Self = Self {
25246        time_usec: 0_u64,
25247        press_abs: 0_i16,
25248        press_diff1: 0_i16,
25249        press_diff2: 0_i16,
25250        temperature: 0_i16,
25251    };
25252    #[cfg(feature = "arbitrary")]
25253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25254        use arbitrary::{Arbitrary, Unstructured};
25255        let mut buf = [0u8; 1024];
25256        rng.fill_bytes(&mut buf);
25257        let mut unstructured = Unstructured::new(&buf);
25258        Self::arbitrary(&mut unstructured).unwrap_or_default()
25259    }
25260}
25261impl Default for RAW_PRESSURE_DATA {
25262    fn default() -> Self {
25263        Self::DEFAULT.clone()
25264    }
25265}
25266impl MessageData for RAW_PRESSURE_DATA {
25267    type Message = MavMessage;
25268    const ID: u32 = 28u32;
25269    const NAME: &'static str = "RAW_PRESSURE";
25270    const EXTRA_CRC: u8 = 67u8;
25271    const ENCODED_LEN: usize = 16usize;
25272    fn deser(
25273        _version: MavlinkVersion,
25274        __input: &[u8],
25275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25276        let avail_len = __input.len();
25277        let mut payload_buf = [0; Self::ENCODED_LEN];
25278        let mut buf = if avail_len < Self::ENCODED_LEN {
25279            payload_buf[0..avail_len].copy_from_slice(__input);
25280            Bytes::new(&payload_buf)
25281        } else {
25282            Bytes::new(__input)
25283        };
25284        let mut __struct = Self::default();
25285        __struct.time_usec = buf.get_u64_le();
25286        __struct.press_abs = buf.get_i16_le();
25287        __struct.press_diff1 = buf.get_i16_le();
25288        __struct.press_diff2 = buf.get_i16_le();
25289        __struct.temperature = buf.get_i16_le();
25290        Ok(__struct)
25291    }
25292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25293        let mut __tmp = BytesMut::new(bytes);
25294        #[allow(clippy::absurd_extreme_comparisons)]
25295        #[allow(unused_comparisons)]
25296        if __tmp.remaining() < Self::ENCODED_LEN {
25297            panic!(
25298                "buffer is too small (need {} bytes, but got {})",
25299                Self::ENCODED_LEN,
25300                __tmp.remaining(),
25301            )
25302        }
25303        __tmp.put_u64_le(self.time_usec);
25304        __tmp.put_i16_le(self.press_abs);
25305        __tmp.put_i16_le(self.press_diff1);
25306        __tmp.put_i16_le(self.press_diff2);
25307        __tmp.put_i16_le(self.temperature);
25308        if matches!(version, MavlinkVersion::V2) {
25309            let len = __tmp.len();
25310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25311        } else {
25312            __tmp.len()
25313        }
25314    }
25315}
25316#[doc = "RPM sensor data message."]
25317#[doc = ""]
25318#[doc = "ID: 339"]
25319#[derive(Debug, Clone, PartialEq)]
25320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25322#[cfg_attr(feature = "ts", derive(TS))]
25323#[cfg_attr(feature = "ts", ts(export))]
25324pub struct RAW_RPM_DATA {
25325    #[doc = "Indicated rate"]
25326    pub frequency: f32,
25327    #[doc = "Index of this RPM sensor (0-indexed)"]
25328    pub index: u8,
25329}
25330impl RAW_RPM_DATA {
25331    pub const ENCODED_LEN: usize = 5usize;
25332    pub const DEFAULT: Self = Self {
25333        frequency: 0.0_f32,
25334        index: 0_u8,
25335    };
25336    #[cfg(feature = "arbitrary")]
25337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25338        use arbitrary::{Arbitrary, Unstructured};
25339        let mut buf = [0u8; 1024];
25340        rng.fill_bytes(&mut buf);
25341        let mut unstructured = Unstructured::new(&buf);
25342        Self::arbitrary(&mut unstructured).unwrap_or_default()
25343    }
25344}
25345impl Default for RAW_RPM_DATA {
25346    fn default() -> Self {
25347        Self::DEFAULT.clone()
25348    }
25349}
25350impl MessageData for RAW_RPM_DATA {
25351    type Message = MavMessage;
25352    const ID: u32 = 339u32;
25353    const NAME: &'static str = "RAW_RPM";
25354    const EXTRA_CRC: u8 = 199u8;
25355    const ENCODED_LEN: usize = 5usize;
25356    fn deser(
25357        _version: MavlinkVersion,
25358        __input: &[u8],
25359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25360        let avail_len = __input.len();
25361        let mut payload_buf = [0; Self::ENCODED_LEN];
25362        let mut buf = if avail_len < Self::ENCODED_LEN {
25363            payload_buf[0..avail_len].copy_from_slice(__input);
25364            Bytes::new(&payload_buf)
25365        } else {
25366            Bytes::new(__input)
25367        };
25368        let mut __struct = Self::default();
25369        __struct.frequency = buf.get_f32_le();
25370        __struct.index = buf.get_u8();
25371        Ok(__struct)
25372    }
25373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25374        let mut __tmp = BytesMut::new(bytes);
25375        #[allow(clippy::absurd_extreme_comparisons)]
25376        #[allow(unused_comparisons)]
25377        if __tmp.remaining() < Self::ENCODED_LEN {
25378            panic!(
25379                "buffer is too small (need {} bytes, but got {})",
25380                Self::ENCODED_LEN,
25381                __tmp.remaining(),
25382            )
25383        }
25384        __tmp.put_f32_le(self.frequency);
25385        __tmp.put_u8(self.index);
25386        if matches!(version, MavlinkVersion::V2) {
25387            let len = __tmp.len();
25388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25389        } else {
25390            __tmp.len()
25391        }
25392    }
25393}
25394#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25395#[doc = ""]
25396#[doc = "ID: 65"]
25397#[derive(Debug, Clone, PartialEq)]
25398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25400#[cfg_attr(feature = "ts", derive(TS))]
25401#[cfg_attr(feature = "ts", ts(export))]
25402pub struct RC_CHANNELS_DATA {
25403    #[doc = "Timestamp (time since system boot)."]
25404    pub time_boot_ms: u32,
25405    #[doc = "RC channel 1 value."]
25406    pub chan1_raw: u16,
25407    #[doc = "RC channel 2 value."]
25408    pub chan2_raw: u16,
25409    #[doc = "RC channel 3 value."]
25410    pub chan3_raw: u16,
25411    #[doc = "RC channel 4 value."]
25412    pub chan4_raw: u16,
25413    #[doc = "RC channel 5 value."]
25414    pub chan5_raw: u16,
25415    #[doc = "RC channel 6 value."]
25416    pub chan6_raw: u16,
25417    #[doc = "RC channel 7 value."]
25418    pub chan7_raw: u16,
25419    #[doc = "RC channel 8 value."]
25420    pub chan8_raw: u16,
25421    #[doc = "RC channel 9 value."]
25422    pub chan9_raw: u16,
25423    #[doc = "RC channel 10 value."]
25424    pub chan10_raw: u16,
25425    #[doc = "RC channel 11 value."]
25426    pub chan11_raw: u16,
25427    #[doc = "RC channel 12 value."]
25428    pub chan12_raw: u16,
25429    #[doc = "RC channel 13 value."]
25430    pub chan13_raw: u16,
25431    #[doc = "RC channel 14 value."]
25432    pub chan14_raw: u16,
25433    #[doc = "RC channel 15 value."]
25434    pub chan15_raw: u16,
25435    #[doc = "RC channel 16 value."]
25436    pub chan16_raw: u16,
25437    #[doc = "RC channel 17 value."]
25438    pub chan17_raw: u16,
25439    #[doc = "RC channel 18 value."]
25440    pub chan18_raw: u16,
25441    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25442    pub chancount: u8,
25443    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25444    pub rssi: u8,
25445}
25446impl RC_CHANNELS_DATA {
25447    pub const ENCODED_LEN: usize = 42usize;
25448    pub const DEFAULT: Self = Self {
25449        time_boot_ms: 0_u32,
25450        chan1_raw: 0_u16,
25451        chan2_raw: 0_u16,
25452        chan3_raw: 0_u16,
25453        chan4_raw: 0_u16,
25454        chan5_raw: 0_u16,
25455        chan6_raw: 0_u16,
25456        chan7_raw: 0_u16,
25457        chan8_raw: 0_u16,
25458        chan9_raw: 0_u16,
25459        chan10_raw: 0_u16,
25460        chan11_raw: 0_u16,
25461        chan12_raw: 0_u16,
25462        chan13_raw: 0_u16,
25463        chan14_raw: 0_u16,
25464        chan15_raw: 0_u16,
25465        chan16_raw: 0_u16,
25466        chan17_raw: 0_u16,
25467        chan18_raw: 0_u16,
25468        chancount: 0_u8,
25469        rssi: 0_u8,
25470    };
25471    #[cfg(feature = "arbitrary")]
25472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25473        use arbitrary::{Arbitrary, Unstructured};
25474        let mut buf = [0u8; 1024];
25475        rng.fill_bytes(&mut buf);
25476        let mut unstructured = Unstructured::new(&buf);
25477        Self::arbitrary(&mut unstructured).unwrap_or_default()
25478    }
25479}
25480impl Default for RC_CHANNELS_DATA {
25481    fn default() -> Self {
25482        Self::DEFAULT.clone()
25483    }
25484}
25485impl MessageData for RC_CHANNELS_DATA {
25486    type Message = MavMessage;
25487    const ID: u32 = 65u32;
25488    const NAME: &'static str = "RC_CHANNELS";
25489    const EXTRA_CRC: u8 = 118u8;
25490    const ENCODED_LEN: usize = 42usize;
25491    fn deser(
25492        _version: MavlinkVersion,
25493        __input: &[u8],
25494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25495        let avail_len = __input.len();
25496        let mut payload_buf = [0; Self::ENCODED_LEN];
25497        let mut buf = if avail_len < Self::ENCODED_LEN {
25498            payload_buf[0..avail_len].copy_from_slice(__input);
25499            Bytes::new(&payload_buf)
25500        } else {
25501            Bytes::new(__input)
25502        };
25503        let mut __struct = Self::default();
25504        __struct.time_boot_ms = buf.get_u32_le();
25505        __struct.chan1_raw = buf.get_u16_le();
25506        __struct.chan2_raw = buf.get_u16_le();
25507        __struct.chan3_raw = buf.get_u16_le();
25508        __struct.chan4_raw = buf.get_u16_le();
25509        __struct.chan5_raw = buf.get_u16_le();
25510        __struct.chan6_raw = buf.get_u16_le();
25511        __struct.chan7_raw = buf.get_u16_le();
25512        __struct.chan8_raw = buf.get_u16_le();
25513        __struct.chan9_raw = buf.get_u16_le();
25514        __struct.chan10_raw = buf.get_u16_le();
25515        __struct.chan11_raw = buf.get_u16_le();
25516        __struct.chan12_raw = buf.get_u16_le();
25517        __struct.chan13_raw = buf.get_u16_le();
25518        __struct.chan14_raw = buf.get_u16_le();
25519        __struct.chan15_raw = buf.get_u16_le();
25520        __struct.chan16_raw = buf.get_u16_le();
25521        __struct.chan17_raw = buf.get_u16_le();
25522        __struct.chan18_raw = buf.get_u16_le();
25523        __struct.chancount = buf.get_u8();
25524        __struct.rssi = buf.get_u8();
25525        Ok(__struct)
25526    }
25527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25528        let mut __tmp = BytesMut::new(bytes);
25529        #[allow(clippy::absurd_extreme_comparisons)]
25530        #[allow(unused_comparisons)]
25531        if __tmp.remaining() < Self::ENCODED_LEN {
25532            panic!(
25533                "buffer is too small (need {} bytes, but got {})",
25534                Self::ENCODED_LEN,
25535                __tmp.remaining(),
25536            )
25537        }
25538        __tmp.put_u32_le(self.time_boot_ms);
25539        __tmp.put_u16_le(self.chan1_raw);
25540        __tmp.put_u16_le(self.chan2_raw);
25541        __tmp.put_u16_le(self.chan3_raw);
25542        __tmp.put_u16_le(self.chan4_raw);
25543        __tmp.put_u16_le(self.chan5_raw);
25544        __tmp.put_u16_le(self.chan6_raw);
25545        __tmp.put_u16_le(self.chan7_raw);
25546        __tmp.put_u16_le(self.chan8_raw);
25547        __tmp.put_u16_le(self.chan9_raw);
25548        __tmp.put_u16_le(self.chan10_raw);
25549        __tmp.put_u16_le(self.chan11_raw);
25550        __tmp.put_u16_le(self.chan12_raw);
25551        __tmp.put_u16_le(self.chan13_raw);
25552        __tmp.put_u16_le(self.chan14_raw);
25553        __tmp.put_u16_le(self.chan15_raw);
25554        __tmp.put_u16_le(self.chan16_raw);
25555        __tmp.put_u16_le(self.chan17_raw);
25556        __tmp.put_u16_le(self.chan18_raw);
25557        __tmp.put_u8(self.chancount);
25558        __tmp.put_u8(self.rssi);
25559        if matches!(version, MavlinkVersion::V2) {
25560            let len = __tmp.len();
25561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25562        } else {
25563            __tmp.len()
25564        }
25565    }
25566}
25567#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25568#[doc = ""]
25569#[doc = "ID: 70"]
25570#[derive(Debug, Clone, PartialEq)]
25571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25573#[cfg_attr(feature = "ts", derive(TS))]
25574#[cfg_attr(feature = "ts", ts(export))]
25575pub struct RC_CHANNELS_OVERRIDE_DATA {
25576    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25577    pub chan1_raw: u16,
25578    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25579    pub chan2_raw: u16,
25580    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25581    pub chan3_raw: u16,
25582    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25583    pub chan4_raw: u16,
25584    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25585    pub chan5_raw: u16,
25586    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25587    pub chan6_raw: u16,
25588    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25589    pub chan7_raw: u16,
25590    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25591    pub chan8_raw: u16,
25592    #[doc = "System ID"]
25593    pub target_system: u8,
25594    #[doc = "Component ID"]
25595    pub target_component: u8,
25596    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25598    pub chan9_raw: u16,
25599    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25601    pub chan10_raw: u16,
25602    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25604    pub chan11_raw: u16,
25605    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25607    pub chan12_raw: u16,
25608    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25609    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25610    pub chan13_raw: u16,
25611    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25612    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25613    pub chan14_raw: u16,
25614    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25616    pub chan15_raw: u16,
25617    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25619    pub chan16_raw: u16,
25620    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25621    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25622    pub chan17_raw: u16,
25623    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25624    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25625    pub chan18_raw: u16,
25626}
25627impl RC_CHANNELS_OVERRIDE_DATA {
25628    pub const ENCODED_LEN: usize = 38usize;
25629    pub const DEFAULT: Self = Self {
25630        chan1_raw: 0_u16,
25631        chan2_raw: 0_u16,
25632        chan3_raw: 0_u16,
25633        chan4_raw: 0_u16,
25634        chan5_raw: 0_u16,
25635        chan6_raw: 0_u16,
25636        chan7_raw: 0_u16,
25637        chan8_raw: 0_u16,
25638        target_system: 0_u8,
25639        target_component: 0_u8,
25640        chan9_raw: 0_u16,
25641        chan10_raw: 0_u16,
25642        chan11_raw: 0_u16,
25643        chan12_raw: 0_u16,
25644        chan13_raw: 0_u16,
25645        chan14_raw: 0_u16,
25646        chan15_raw: 0_u16,
25647        chan16_raw: 0_u16,
25648        chan17_raw: 0_u16,
25649        chan18_raw: 0_u16,
25650    };
25651    #[cfg(feature = "arbitrary")]
25652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25653        use arbitrary::{Arbitrary, Unstructured};
25654        let mut buf = [0u8; 1024];
25655        rng.fill_bytes(&mut buf);
25656        let mut unstructured = Unstructured::new(&buf);
25657        Self::arbitrary(&mut unstructured).unwrap_or_default()
25658    }
25659}
25660impl Default for RC_CHANNELS_OVERRIDE_DATA {
25661    fn default() -> Self {
25662        Self::DEFAULT.clone()
25663    }
25664}
25665impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25666    type Message = MavMessage;
25667    const ID: u32 = 70u32;
25668    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25669    const EXTRA_CRC: u8 = 124u8;
25670    const ENCODED_LEN: usize = 38usize;
25671    fn deser(
25672        _version: MavlinkVersion,
25673        __input: &[u8],
25674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25675        let avail_len = __input.len();
25676        let mut payload_buf = [0; Self::ENCODED_LEN];
25677        let mut buf = if avail_len < Self::ENCODED_LEN {
25678            payload_buf[0..avail_len].copy_from_slice(__input);
25679            Bytes::new(&payload_buf)
25680        } else {
25681            Bytes::new(__input)
25682        };
25683        let mut __struct = Self::default();
25684        __struct.chan1_raw = buf.get_u16_le();
25685        __struct.chan2_raw = buf.get_u16_le();
25686        __struct.chan3_raw = buf.get_u16_le();
25687        __struct.chan4_raw = buf.get_u16_le();
25688        __struct.chan5_raw = buf.get_u16_le();
25689        __struct.chan6_raw = buf.get_u16_le();
25690        __struct.chan7_raw = buf.get_u16_le();
25691        __struct.chan8_raw = buf.get_u16_le();
25692        __struct.target_system = buf.get_u8();
25693        __struct.target_component = buf.get_u8();
25694        __struct.chan9_raw = buf.get_u16_le();
25695        __struct.chan10_raw = buf.get_u16_le();
25696        __struct.chan11_raw = buf.get_u16_le();
25697        __struct.chan12_raw = buf.get_u16_le();
25698        __struct.chan13_raw = buf.get_u16_le();
25699        __struct.chan14_raw = buf.get_u16_le();
25700        __struct.chan15_raw = buf.get_u16_le();
25701        __struct.chan16_raw = buf.get_u16_le();
25702        __struct.chan17_raw = buf.get_u16_le();
25703        __struct.chan18_raw = buf.get_u16_le();
25704        Ok(__struct)
25705    }
25706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25707        let mut __tmp = BytesMut::new(bytes);
25708        #[allow(clippy::absurd_extreme_comparisons)]
25709        #[allow(unused_comparisons)]
25710        if __tmp.remaining() < Self::ENCODED_LEN {
25711            panic!(
25712                "buffer is too small (need {} bytes, but got {})",
25713                Self::ENCODED_LEN,
25714                __tmp.remaining(),
25715            )
25716        }
25717        __tmp.put_u16_le(self.chan1_raw);
25718        __tmp.put_u16_le(self.chan2_raw);
25719        __tmp.put_u16_le(self.chan3_raw);
25720        __tmp.put_u16_le(self.chan4_raw);
25721        __tmp.put_u16_le(self.chan5_raw);
25722        __tmp.put_u16_le(self.chan6_raw);
25723        __tmp.put_u16_le(self.chan7_raw);
25724        __tmp.put_u16_le(self.chan8_raw);
25725        __tmp.put_u8(self.target_system);
25726        __tmp.put_u8(self.target_component);
25727        if matches!(version, MavlinkVersion::V2) {
25728            __tmp.put_u16_le(self.chan9_raw);
25729            __tmp.put_u16_le(self.chan10_raw);
25730            __tmp.put_u16_le(self.chan11_raw);
25731            __tmp.put_u16_le(self.chan12_raw);
25732            __tmp.put_u16_le(self.chan13_raw);
25733            __tmp.put_u16_le(self.chan14_raw);
25734            __tmp.put_u16_le(self.chan15_raw);
25735            __tmp.put_u16_le(self.chan16_raw);
25736            __tmp.put_u16_le(self.chan17_raw);
25737            __tmp.put_u16_le(self.chan18_raw);
25738            let len = __tmp.len();
25739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25740        } else {
25741            __tmp.len()
25742        }
25743    }
25744}
25745#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25746#[doc = ""]
25747#[doc = "ID: 35"]
25748#[derive(Debug, Clone, PartialEq)]
25749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25751#[cfg_attr(feature = "ts", derive(TS))]
25752#[cfg_attr(feature = "ts", ts(export))]
25753pub struct RC_CHANNELS_RAW_DATA {
25754    #[doc = "Timestamp (time since system boot)."]
25755    pub time_boot_ms: u32,
25756    #[doc = "RC channel 1 value."]
25757    pub chan1_raw: u16,
25758    #[doc = "RC channel 2 value."]
25759    pub chan2_raw: u16,
25760    #[doc = "RC channel 3 value."]
25761    pub chan3_raw: u16,
25762    #[doc = "RC channel 4 value."]
25763    pub chan4_raw: u16,
25764    #[doc = "RC channel 5 value."]
25765    pub chan5_raw: u16,
25766    #[doc = "RC channel 6 value."]
25767    pub chan6_raw: u16,
25768    #[doc = "RC channel 7 value."]
25769    pub chan7_raw: u16,
25770    #[doc = "RC channel 8 value."]
25771    pub chan8_raw: u16,
25772    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25773    pub port: u8,
25774    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25775    pub rssi: u8,
25776}
25777impl RC_CHANNELS_RAW_DATA {
25778    pub const ENCODED_LEN: usize = 22usize;
25779    pub const DEFAULT: Self = Self {
25780        time_boot_ms: 0_u32,
25781        chan1_raw: 0_u16,
25782        chan2_raw: 0_u16,
25783        chan3_raw: 0_u16,
25784        chan4_raw: 0_u16,
25785        chan5_raw: 0_u16,
25786        chan6_raw: 0_u16,
25787        chan7_raw: 0_u16,
25788        chan8_raw: 0_u16,
25789        port: 0_u8,
25790        rssi: 0_u8,
25791    };
25792    #[cfg(feature = "arbitrary")]
25793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25794        use arbitrary::{Arbitrary, Unstructured};
25795        let mut buf = [0u8; 1024];
25796        rng.fill_bytes(&mut buf);
25797        let mut unstructured = Unstructured::new(&buf);
25798        Self::arbitrary(&mut unstructured).unwrap_or_default()
25799    }
25800}
25801impl Default for RC_CHANNELS_RAW_DATA {
25802    fn default() -> Self {
25803        Self::DEFAULT.clone()
25804    }
25805}
25806impl MessageData for RC_CHANNELS_RAW_DATA {
25807    type Message = MavMessage;
25808    const ID: u32 = 35u32;
25809    const NAME: &'static str = "RC_CHANNELS_RAW";
25810    const EXTRA_CRC: u8 = 244u8;
25811    const ENCODED_LEN: usize = 22usize;
25812    fn deser(
25813        _version: MavlinkVersion,
25814        __input: &[u8],
25815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25816        let avail_len = __input.len();
25817        let mut payload_buf = [0; Self::ENCODED_LEN];
25818        let mut buf = if avail_len < Self::ENCODED_LEN {
25819            payload_buf[0..avail_len].copy_from_slice(__input);
25820            Bytes::new(&payload_buf)
25821        } else {
25822            Bytes::new(__input)
25823        };
25824        let mut __struct = Self::default();
25825        __struct.time_boot_ms = buf.get_u32_le();
25826        __struct.chan1_raw = buf.get_u16_le();
25827        __struct.chan2_raw = buf.get_u16_le();
25828        __struct.chan3_raw = buf.get_u16_le();
25829        __struct.chan4_raw = buf.get_u16_le();
25830        __struct.chan5_raw = buf.get_u16_le();
25831        __struct.chan6_raw = buf.get_u16_le();
25832        __struct.chan7_raw = buf.get_u16_le();
25833        __struct.chan8_raw = buf.get_u16_le();
25834        __struct.port = buf.get_u8();
25835        __struct.rssi = buf.get_u8();
25836        Ok(__struct)
25837    }
25838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25839        let mut __tmp = BytesMut::new(bytes);
25840        #[allow(clippy::absurd_extreme_comparisons)]
25841        #[allow(unused_comparisons)]
25842        if __tmp.remaining() < Self::ENCODED_LEN {
25843            panic!(
25844                "buffer is too small (need {} bytes, but got {})",
25845                Self::ENCODED_LEN,
25846                __tmp.remaining(),
25847            )
25848        }
25849        __tmp.put_u32_le(self.time_boot_ms);
25850        __tmp.put_u16_le(self.chan1_raw);
25851        __tmp.put_u16_le(self.chan2_raw);
25852        __tmp.put_u16_le(self.chan3_raw);
25853        __tmp.put_u16_le(self.chan4_raw);
25854        __tmp.put_u16_le(self.chan5_raw);
25855        __tmp.put_u16_le(self.chan6_raw);
25856        __tmp.put_u16_le(self.chan7_raw);
25857        __tmp.put_u16_le(self.chan8_raw);
25858        __tmp.put_u8(self.port);
25859        __tmp.put_u8(self.rssi);
25860        if matches!(version, MavlinkVersion::V2) {
25861            let len = __tmp.len();
25862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25863        } else {
25864            __tmp.len()
25865        }
25866    }
25867}
25868#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25869#[doc = ""]
25870#[doc = "ID: 34"]
25871#[derive(Debug, Clone, PartialEq)]
25872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25874#[cfg_attr(feature = "ts", derive(TS))]
25875#[cfg_attr(feature = "ts", ts(export))]
25876pub struct RC_CHANNELS_SCALED_DATA {
25877    #[doc = "Timestamp (time since system boot)."]
25878    pub time_boot_ms: u32,
25879    #[doc = "RC channel 1 value scaled."]
25880    pub chan1_scaled: i16,
25881    #[doc = "RC channel 2 value scaled."]
25882    pub chan2_scaled: i16,
25883    #[doc = "RC channel 3 value scaled."]
25884    pub chan3_scaled: i16,
25885    #[doc = "RC channel 4 value scaled."]
25886    pub chan4_scaled: i16,
25887    #[doc = "RC channel 5 value scaled."]
25888    pub chan5_scaled: i16,
25889    #[doc = "RC channel 6 value scaled."]
25890    pub chan6_scaled: i16,
25891    #[doc = "RC channel 7 value scaled."]
25892    pub chan7_scaled: i16,
25893    #[doc = "RC channel 8 value scaled."]
25894    pub chan8_scaled: i16,
25895    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25896    pub port: u8,
25897    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25898    pub rssi: u8,
25899}
25900impl RC_CHANNELS_SCALED_DATA {
25901    pub const ENCODED_LEN: usize = 22usize;
25902    pub const DEFAULT: Self = Self {
25903        time_boot_ms: 0_u32,
25904        chan1_scaled: 0_i16,
25905        chan2_scaled: 0_i16,
25906        chan3_scaled: 0_i16,
25907        chan4_scaled: 0_i16,
25908        chan5_scaled: 0_i16,
25909        chan6_scaled: 0_i16,
25910        chan7_scaled: 0_i16,
25911        chan8_scaled: 0_i16,
25912        port: 0_u8,
25913        rssi: 0_u8,
25914    };
25915    #[cfg(feature = "arbitrary")]
25916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25917        use arbitrary::{Arbitrary, Unstructured};
25918        let mut buf = [0u8; 1024];
25919        rng.fill_bytes(&mut buf);
25920        let mut unstructured = Unstructured::new(&buf);
25921        Self::arbitrary(&mut unstructured).unwrap_or_default()
25922    }
25923}
25924impl Default for RC_CHANNELS_SCALED_DATA {
25925    fn default() -> Self {
25926        Self::DEFAULT.clone()
25927    }
25928}
25929impl MessageData for RC_CHANNELS_SCALED_DATA {
25930    type Message = MavMessage;
25931    const ID: u32 = 34u32;
25932    const NAME: &'static str = "RC_CHANNELS_SCALED";
25933    const EXTRA_CRC: u8 = 237u8;
25934    const ENCODED_LEN: usize = 22usize;
25935    fn deser(
25936        _version: MavlinkVersion,
25937        __input: &[u8],
25938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25939        let avail_len = __input.len();
25940        let mut payload_buf = [0; Self::ENCODED_LEN];
25941        let mut buf = if avail_len < Self::ENCODED_LEN {
25942            payload_buf[0..avail_len].copy_from_slice(__input);
25943            Bytes::new(&payload_buf)
25944        } else {
25945            Bytes::new(__input)
25946        };
25947        let mut __struct = Self::default();
25948        __struct.time_boot_ms = buf.get_u32_le();
25949        __struct.chan1_scaled = buf.get_i16_le();
25950        __struct.chan2_scaled = buf.get_i16_le();
25951        __struct.chan3_scaled = buf.get_i16_le();
25952        __struct.chan4_scaled = buf.get_i16_le();
25953        __struct.chan5_scaled = buf.get_i16_le();
25954        __struct.chan6_scaled = buf.get_i16_le();
25955        __struct.chan7_scaled = buf.get_i16_le();
25956        __struct.chan8_scaled = buf.get_i16_le();
25957        __struct.port = buf.get_u8();
25958        __struct.rssi = buf.get_u8();
25959        Ok(__struct)
25960    }
25961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25962        let mut __tmp = BytesMut::new(bytes);
25963        #[allow(clippy::absurd_extreme_comparisons)]
25964        #[allow(unused_comparisons)]
25965        if __tmp.remaining() < Self::ENCODED_LEN {
25966            panic!(
25967                "buffer is too small (need {} bytes, but got {})",
25968                Self::ENCODED_LEN,
25969                __tmp.remaining(),
25970            )
25971        }
25972        __tmp.put_u32_le(self.time_boot_ms);
25973        __tmp.put_i16_le(self.chan1_scaled);
25974        __tmp.put_i16_le(self.chan2_scaled);
25975        __tmp.put_i16_le(self.chan3_scaled);
25976        __tmp.put_i16_le(self.chan4_scaled);
25977        __tmp.put_i16_le(self.chan5_scaled);
25978        __tmp.put_i16_le(self.chan6_scaled);
25979        __tmp.put_i16_le(self.chan7_scaled);
25980        __tmp.put_i16_le(self.chan8_scaled);
25981        __tmp.put_u8(self.port);
25982        __tmp.put_u8(self.rssi);
25983        if matches!(version, MavlinkVersion::V2) {
25984            let len = __tmp.len();
25985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25986        } else {
25987            __tmp.len()
25988        }
25989    }
25990}
25991#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25992#[doc = "Request a data stream."]
25993#[doc = ""]
25994#[doc = "ID: 66"]
25995#[derive(Debug, Clone, PartialEq)]
25996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25998#[cfg_attr(feature = "ts", derive(TS))]
25999#[cfg_attr(feature = "ts", ts(export))]
26000pub struct REQUEST_DATA_STREAM_DATA {
26001    #[doc = "The requested message rate"]
26002    pub req_message_rate: u16,
26003    #[doc = "The target requested to send the message stream."]
26004    pub target_system: u8,
26005    #[doc = "The target requested to send the message stream."]
26006    pub target_component: u8,
26007    #[doc = "The ID of the requested data stream"]
26008    pub req_stream_id: u8,
26009    #[doc = "1 to start sending, 0 to stop sending."]
26010    pub start_stop: u8,
26011}
26012impl REQUEST_DATA_STREAM_DATA {
26013    pub const ENCODED_LEN: usize = 6usize;
26014    pub const DEFAULT: Self = Self {
26015        req_message_rate: 0_u16,
26016        target_system: 0_u8,
26017        target_component: 0_u8,
26018        req_stream_id: 0_u8,
26019        start_stop: 0_u8,
26020    };
26021    #[cfg(feature = "arbitrary")]
26022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26023        use arbitrary::{Arbitrary, Unstructured};
26024        let mut buf = [0u8; 1024];
26025        rng.fill_bytes(&mut buf);
26026        let mut unstructured = Unstructured::new(&buf);
26027        Self::arbitrary(&mut unstructured).unwrap_or_default()
26028    }
26029}
26030impl Default for REQUEST_DATA_STREAM_DATA {
26031    fn default() -> Self {
26032        Self::DEFAULT.clone()
26033    }
26034}
26035impl MessageData for REQUEST_DATA_STREAM_DATA {
26036    type Message = MavMessage;
26037    const ID: u32 = 66u32;
26038    const NAME: &'static str = "REQUEST_DATA_STREAM";
26039    const EXTRA_CRC: u8 = 148u8;
26040    const ENCODED_LEN: usize = 6usize;
26041    fn deser(
26042        _version: MavlinkVersion,
26043        __input: &[u8],
26044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26045        let avail_len = __input.len();
26046        let mut payload_buf = [0; Self::ENCODED_LEN];
26047        let mut buf = if avail_len < Self::ENCODED_LEN {
26048            payload_buf[0..avail_len].copy_from_slice(__input);
26049            Bytes::new(&payload_buf)
26050        } else {
26051            Bytes::new(__input)
26052        };
26053        let mut __struct = Self::default();
26054        __struct.req_message_rate = buf.get_u16_le();
26055        __struct.target_system = buf.get_u8();
26056        __struct.target_component = buf.get_u8();
26057        __struct.req_stream_id = buf.get_u8();
26058        __struct.start_stop = buf.get_u8();
26059        Ok(__struct)
26060    }
26061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26062        let mut __tmp = BytesMut::new(bytes);
26063        #[allow(clippy::absurd_extreme_comparisons)]
26064        #[allow(unused_comparisons)]
26065        if __tmp.remaining() < Self::ENCODED_LEN {
26066            panic!(
26067                "buffer is too small (need {} bytes, but got {})",
26068                Self::ENCODED_LEN,
26069                __tmp.remaining(),
26070            )
26071        }
26072        __tmp.put_u16_le(self.req_message_rate);
26073        __tmp.put_u8(self.target_system);
26074        __tmp.put_u8(self.target_component);
26075        __tmp.put_u8(self.req_stream_id);
26076        __tmp.put_u8(self.start_stop);
26077        if matches!(version, MavlinkVersion::V2) {
26078            let len = __tmp.len();
26079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26080        } else {
26081            __tmp.len()
26082        }
26083    }
26084}
26085#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26086#[doc = ""]
26087#[doc = "ID: 412"]
26088#[derive(Debug, Clone, PartialEq)]
26089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26091#[cfg_attr(feature = "ts", derive(TS))]
26092#[cfg_attr(feature = "ts", ts(export))]
26093pub struct REQUEST_EVENT_DATA {
26094    #[doc = "First sequence number of the requested event."]
26095    pub first_sequence: u16,
26096    #[doc = "Last sequence number of the requested event."]
26097    pub last_sequence: u16,
26098    #[doc = "System ID"]
26099    pub target_system: u8,
26100    #[doc = "Component ID"]
26101    pub target_component: u8,
26102}
26103impl REQUEST_EVENT_DATA {
26104    pub const ENCODED_LEN: usize = 6usize;
26105    pub const DEFAULT: Self = Self {
26106        first_sequence: 0_u16,
26107        last_sequence: 0_u16,
26108        target_system: 0_u8,
26109        target_component: 0_u8,
26110    };
26111    #[cfg(feature = "arbitrary")]
26112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26113        use arbitrary::{Arbitrary, Unstructured};
26114        let mut buf = [0u8; 1024];
26115        rng.fill_bytes(&mut buf);
26116        let mut unstructured = Unstructured::new(&buf);
26117        Self::arbitrary(&mut unstructured).unwrap_or_default()
26118    }
26119}
26120impl Default for REQUEST_EVENT_DATA {
26121    fn default() -> Self {
26122        Self::DEFAULT.clone()
26123    }
26124}
26125impl MessageData for REQUEST_EVENT_DATA {
26126    type Message = MavMessage;
26127    const ID: u32 = 412u32;
26128    const NAME: &'static str = "REQUEST_EVENT";
26129    const EXTRA_CRC: u8 = 33u8;
26130    const ENCODED_LEN: usize = 6usize;
26131    fn deser(
26132        _version: MavlinkVersion,
26133        __input: &[u8],
26134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26135        let avail_len = __input.len();
26136        let mut payload_buf = [0; Self::ENCODED_LEN];
26137        let mut buf = if avail_len < Self::ENCODED_LEN {
26138            payload_buf[0..avail_len].copy_from_slice(__input);
26139            Bytes::new(&payload_buf)
26140        } else {
26141            Bytes::new(__input)
26142        };
26143        let mut __struct = Self::default();
26144        __struct.first_sequence = buf.get_u16_le();
26145        __struct.last_sequence = buf.get_u16_le();
26146        __struct.target_system = buf.get_u8();
26147        __struct.target_component = buf.get_u8();
26148        Ok(__struct)
26149    }
26150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26151        let mut __tmp = BytesMut::new(bytes);
26152        #[allow(clippy::absurd_extreme_comparisons)]
26153        #[allow(unused_comparisons)]
26154        if __tmp.remaining() < Self::ENCODED_LEN {
26155            panic!(
26156                "buffer is too small (need {} bytes, but got {})",
26157                Self::ENCODED_LEN,
26158                __tmp.remaining(),
26159            )
26160        }
26161        __tmp.put_u16_le(self.first_sequence);
26162        __tmp.put_u16_le(self.last_sequence);
26163        __tmp.put_u8(self.target_system);
26164        __tmp.put_u8(self.target_component);
26165        if matches!(version, MavlinkVersion::V2) {
26166            let len = __tmp.len();
26167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26168        } else {
26169            __tmp.len()
26170        }
26171    }
26172}
26173#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26174#[doc = ""]
26175#[doc = "ID: 142"]
26176#[derive(Debug, Clone, PartialEq)]
26177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26179#[cfg_attr(feature = "ts", derive(TS))]
26180#[cfg_attr(feature = "ts", ts(export))]
26181pub struct RESOURCE_REQUEST_DATA {
26182    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26183    pub request_id: u8,
26184    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26185    pub uri_type: u8,
26186    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26189    pub uri: [u8; 120],
26190    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26191    pub transfer_type: u8,
26192    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26194    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26195    pub storage: [u8; 120],
26196}
26197impl RESOURCE_REQUEST_DATA {
26198    pub const ENCODED_LEN: usize = 243usize;
26199    pub const DEFAULT: Self = Self {
26200        request_id: 0_u8,
26201        uri_type: 0_u8,
26202        uri: [0_u8; 120usize],
26203        transfer_type: 0_u8,
26204        storage: [0_u8; 120usize],
26205    };
26206    #[cfg(feature = "arbitrary")]
26207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26208        use arbitrary::{Arbitrary, Unstructured};
26209        let mut buf = [0u8; 1024];
26210        rng.fill_bytes(&mut buf);
26211        let mut unstructured = Unstructured::new(&buf);
26212        Self::arbitrary(&mut unstructured).unwrap_or_default()
26213    }
26214}
26215impl Default for RESOURCE_REQUEST_DATA {
26216    fn default() -> Self {
26217        Self::DEFAULT.clone()
26218    }
26219}
26220impl MessageData for RESOURCE_REQUEST_DATA {
26221    type Message = MavMessage;
26222    const ID: u32 = 142u32;
26223    const NAME: &'static str = "RESOURCE_REQUEST";
26224    const EXTRA_CRC: u8 = 72u8;
26225    const ENCODED_LEN: usize = 243usize;
26226    fn deser(
26227        _version: MavlinkVersion,
26228        __input: &[u8],
26229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26230        let avail_len = __input.len();
26231        let mut payload_buf = [0; Self::ENCODED_LEN];
26232        let mut buf = if avail_len < Self::ENCODED_LEN {
26233            payload_buf[0..avail_len].copy_from_slice(__input);
26234            Bytes::new(&payload_buf)
26235        } else {
26236            Bytes::new(__input)
26237        };
26238        let mut __struct = Self::default();
26239        __struct.request_id = buf.get_u8();
26240        __struct.uri_type = buf.get_u8();
26241        for v in &mut __struct.uri {
26242            let val = buf.get_u8();
26243            *v = val;
26244        }
26245        __struct.transfer_type = buf.get_u8();
26246        for v in &mut __struct.storage {
26247            let val = buf.get_u8();
26248            *v = val;
26249        }
26250        Ok(__struct)
26251    }
26252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26253        let mut __tmp = BytesMut::new(bytes);
26254        #[allow(clippy::absurd_extreme_comparisons)]
26255        #[allow(unused_comparisons)]
26256        if __tmp.remaining() < Self::ENCODED_LEN {
26257            panic!(
26258                "buffer is too small (need {} bytes, but got {})",
26259                Self::ENCODED_LEN,
26260                __tmp.remaining(),
26261            )
26262        }
26263        __tmp.put_u8(self.request_id);
26264        __tmp.put_u8(self.uri_type);
26265        for val in &self.uri {
26266            __tmp.put_u8(*val);
26267        }
26268        __tmp.put_u8(self.transfer_type);
26269        for val in &self.storage {
26270            __tmp.put_u8(*val);
26271        }
26272        if matches!(version, MavlinkVersion::V2) {
26273            let len = __tmp.len();
26274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26275        } else {
26276            __tmp.len()
26277        }
26278    }
26279}
26280#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26281#[doc = ""]
26282#[doc = "ID: 413"]
26283#[derive(Debug, Clone, PartialEq)]
26284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26286#[cfg_attr(feature = "ts", derive(TS))]
26287#[cfg_attr(feature = "ts", ts(export))]
26288pub struct RESPONSE_EVENT_ERROR_DATA {
26289    #[doc = "Sequence number."]
26290    pub sequence: u16,
26291    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26292    pub sequence_oldest_available: u16,
26293    #[doc = "System ID"]
26294    pub target_system: u8,
26295    #[doc = "Component ID"]
26296    pub target_component: u8,
26297    #[doc = "Error reason."]
26298    pub reason: MavEventErrorReason,
26299}
26300impl RESPONSE_EVENT_ERROR_DATA {
26301    pub const ENCODED_LEN: usize = 7usize;
26302    pub const DEFAULT: Self = Self {
26303        sequence: 0_u16,
26304        sequence_oldest_available: 0_u16,
26305        target_system: 0_u8,
26306        target_component: 0_u8,
26307        reason: MavEventErrorReason::DEFAULT,
26308    };
26309    #[cfg(feature = "arbitrary")]
26310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26311        use arbitrary::{Arbitrary, Unstructured};
26312        let mut buf = [0u8; 1024];
26313        rng.fill_bytes(&mut buf);
26314        let mut unstructured = Unstructured::new(&buf);
26315        Self::arbitrary(&mut unstructured).unwrap_or_default()
26316    }
26317}
26318impl Default for RESPONSE_EVENT_ERROR_DATA {
26319    fn default() -> Self {
26320        Self::DEFAULT.clone()
26321    }
26322}
26323impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26324    type Message = MavMessage;
26325    const ID: u32 = 413u32;
26326    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26327    const EXTRA_CRC: u8 = 77u8;
26328    const ENCODED_LEN: usize = 7usize;
26329    fn deser(
26330        _version: MavlinkVersion,
26331        __input: &[u8],
26332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26333        let avail_len = __input.len();
26334        let mut payload_buf = [0; Self::ENCODED_LEN];
26335        let mut buf = if avail_len < Self::ENCODED_LEN {
26336            payload_buf[0..avail_len].copy_from_slice(__input);
26337            Bytes::new(&payload_buf)
26338        } else {
26339            Bytes::new(__input)
26340        };
26341        let mut __struct = Self::default();
26342        __struct.sequence = buf.get_u16_le();
26343        __struct.sequence_oldest_available = buf.get_u16_le();
26344        __struct.target_system = buf.get_u8();
26345        __struct.target_component = buf.get_u8();
26346        let tmp = buf.get_u8();
26347        __struct.reason =
26348            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26349                enum_type: "MavEventErrorReason",
26350                value: tmp as u32,
26351            })?;
26352        Ok(__struct)
26353    }
26354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26355        let mut __tmp = BytesMut::new(bytes);
26356        #[allow(clippy::absurd_extreme_comparisons)]
26357        #[allow(unused_comparisons)]
26358        if __tmp.remaining() < Self::ENCODED_LEN {
26359            panic!(
26360                "buffer is too small (need {} bytes, but got {})",
26361                Self::ENCODED_LEN,
26362                __tmp.remaining(),
26363            )
26364        }
26365        __tmp.put_u16_le(self.sequence);
26366        __tmp.put_u16_le(self.sequence_oldest_available);
26367        __tmp.put_u8(self.target_system);
26368        __tmp.put_u8(self.target_component);
26369        __tmp.put_u8(self.reason as u8);
26370        if matches!(version, MavlinkVersion::V2) {
26371            let len = __tmp.len();
26372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26373        } else {
26374            __tmp.len()
26375        }
26376    }
26377}
26378#[doc = "Read out the safety zone the MAV currently assumes."]
26379#[doc = ""]
26380#[doc = "ID: 55"]
26381#[derive(Debug, Clone, PartialEq)]
26382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26384#[cfg_attr(feature = "ts", derive(TS))]
26385#[cfg_attr(feature = "ts", ts(export))]
26386pub struct SAFETY_ALLOWED_AREA_DATA {
26387    #[doc = "x position 1 / Latitude 1"]
26388    pub p1x: f32,
26389    #[doc = "y position 1 / Longitude 1"]
26390    pub p1y: f32,
26391    #[doc = "z position 1 / Altitude 1"]
26392    pub p1z: f32,
26393    #[doc = "x position 2 / Latitude 2"]
26394    pub p2x: f32,
26395    #[doc = "y position 2 / Longitude 2"]
26396    pub p2y: f32,
26397    #[doc = "z position 2 / Altitude 2"]
26398    pub p2z: f32,
26399    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26400    pub frame: MavFrame,
26401}
26402impl SAFETY_ALLOWED_AREA_DATA {
26403    pub const ENCODED_LEN: usize = 25usize;
26404    pub const DEFAULT: Self = Self {
26405        p1x: 0.0_f32,
26406        p1y: 0.0_f32,
26407        p1z: 0.0_f32,
26408        p2x: 0.0_f32,
26409        p2y: 0.0_f32,
26410        p2z: 0.0_f32,
26411        frame: MavFrame::DEFAULT,
26412    };
26413    #[cfg(feature = "arbitrary")]
26414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26415        use arbitrary::{Arbitrary, Unstructured};
26416        let mut buf = [0u8; 1024];
26417        rng.fill_bytes(&mut buf);
26418        let mut unstructured = Unstructured::new(&buf);
26419        Self::arbitrary(&mut unstructured).unwrap_or_default()
26420    }
26421}
26422impl Default for SAFETY_ALLOWED_AREA_DATA {
26423    fn default() -> Self {
26424        Self::DEFAULT.clone()
26425    }
26426}
26427impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26428    type Message = MavMessage;
26429    const ID: u32 = 55u32;
26430    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26431    const EXTRA_CRC: u8 = 3u8;
26432    const ENCODED_LEN: usize = 25usize;
26433    fn deser(
26434        _version: MavlinkVersion,
26435        __input: &[u8],
26436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26437        let avail_len = __input.len();
26438        let mut payload_buf = [0; Self::ENCODED_LEN];
26439        let mut buf = if avail_len < Self::ENCODED_LEN {
26440            payload_buf[0..avail_len].copy_from_slice(__input);
26441            Bytes::new(&payload_buf)
26442        } else {
26443            Bytes::new(__input)
26444        };
26445        let mut __struct = Self::default();
26446        __struct.p1x = buf.get_f32_le();
26447        __struct.p1y = buf.get_f32_le();
26448        __struct.p1z = buf.get_f32_le();
26449        __struct.p2x = buf.get_f32_le();
26450        __struct.p2y = buf.get_f32_le();
26451        __struct.p2z = buf.get_f32_le();
26452        let tmp = buf.get_u8();
26453        __struct.frame =
26454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26455                enum_type: "MavFrame",
26456                value: tmp as u32,
26457            })?;
26458        Ok(__struct)
26459    }
26460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26461        let mut __tmp = BytesMut::new(bytes);
26462        #[allow(clippy::absurd_extreme_comparisons)]
26463        #[allow(unused_comparisons)]
26464        if __tmp.remaining() < Self::ENCODED_LEN {
26465            panic!(
26466                "buffer is too small (need {} bytes, but got {})",
26467                Self::ENCODED_LEN,
26468                __tmp.remaining(),
26469            )
26470        }
26471        __tmp.put_f32_le(self.p1x);
26472        __tmp.put_f32_le(self.p1y);
26473        __tmp.put_f32_le(self.p1z);
26474        __tmp.put_f32_le(self.p2x);
26475        __tmp.put_f32_le(self.p2y);
26476        __tmp.put_f32_le(self.p2z);
26477        __tmp.put_u8(self.frame as u8);
26478        if matches!(version, MavlinkVersion::V2) {
26479            let len = __tmp.len();
26480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26481        } else {
26482            __tmp.len()
26483        }
26484    }
26485}
26486#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26487#[doc = ""]
26488#[doc = "ID: 54"]
26489#[derive(Debug, Clone, PartialEq)]
26490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26492#[cfg_attr(feature = "ts", derive(TS))]
26493#[cfg_attr(feature = "ts", ts(export))]
26494pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26495    #[doc = "x position 1 / Latitude 1"]
26496    pub p1x: f32,
26497    #[doc = "y position 1 / Longitude 1"]
26498    pub p1y: f32,
26499    #[doc = "z position 1 / Altitude 1"]
26500    pub p1z: f32,
26501    #[doc = "x position 2 / Latitude 2"]
26502    pub p2x: f32,
26503    #[doc = "y position 2 / Longitude 2"]
26504    pub p2y: f32,
26505    #[doc = "z position 2 / Altitude 2"]
26506    pub p2z: f32,
26507    #[doc = "System ID"]
26508    pub target_system: u8,
26509    #[doc = "Component ID"]
26510    pub target_component: u8,
26511    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26512    pub frame: MavFrame,
26513}
26514impl SAFETY_SET_ALLOWED_AREA_DATA {
26515    pub const ENCODED_LEN: usize = 27usize;
26516    pub const DEFAULT: Self = Self {
26517        p1x: 0.0_f32,
26518        p1y: 0.0_f32,
26519        p1z: 0.0_f32,
26520        p2x: 0.0_f32,
26521        p2y: 0.0_f32,
26522        p2z: 0.0_f32,
26523        target_system: 0_u8,
26524        target_component: 0_u8,
26525        frame: MavFrame::DEFAULT,
26526    };
26527    #[cfg(feature = "arbitrary")]
26528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26529        use arbitrary::{Arbitrary, Unstructured};
26530        let mut buf = [0u8; 1024];
26531        rng.fill_bytes(&mut buf);
26532        let mut unstructured = Unstructured::new(&buf);
26533        Self::arbitrary(&mut unstructured).unwrap_or_default()
26534    }
26535}
26536impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26537    fn default() -> Self {
26538        Self::DEFAULT.clone()
26539    }
26540}
26541impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26542    type Message = MavMessage;
26543    const ID: u32 = 54u32;
26544    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26545    const EXTRA_CRC: u8 = 15u8;
26546    const ENCODED_LEN: usize = 27usize;
26547    fn deser(
26548        _version: MavlinkVersion,
26549        __input: &[u8],
26550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26551        let avail_len = __input.len();
26552        let mut payload_buf = [0; Self::ENCODED_LEN];
26553        let mut buf = if avail_len < Self::ENCODED_LEN {
26554            payload_buf[0..avail_len].copy_from_slice(__input);
26555            Bytes::new(&payload_buf)
26556        } else {
26557            Bytes::new(__input)
26558        };
26559        let mut __struct = Self::default();
26560        __struct.p1x = buf.get_f32_le();
26561        __struct.p1y = buf.get_f32_le();
26562        __struct.p1z = buf.get_f32_le();
26563        __struct.p2x = buf.get_f32_le();
26564        __struct.p2y = buf.get_f32_le();
26565        __struct.p2z = buf.get_f32_le();
26566        __struct.target_system = buf.get_u8();
26567        __struct.target_component = buf.get_u8();
26568        let tmp = buf.get_u8();
26569        __struct.frame =
26570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26571                enum_type: "MavFrame",
26572                value: tmp as u32,
26573            })?;
26574        Ok(__struct)
26575    }
26576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26577        let mut __tmp = BytesMut::new(bytes);
26578        #[allow(clippy::absurd_extreme_comparisons)]
26579        #[allow(unused_comparisons)]
26580        if __tmp.remaining() < Self::ENCODED_LEN {
26581            panic!(
26582                "buffer is too small (need {} bytes, but got {})",
26583                Self::ENCODED_LEN,
26584                __tmp.remaining(),
26585            )
26586        }
26587        __tmp.put_f32_le(self.p1x);
26588        __tmp.put_f32_le(self.p1y);
26589        __tmp.put_f32_le(self.p1z);
26590        __tmp.put_f32_le(self.p2x);
26591        __tmp.put_f32_le(self.p2y);
26592        __tmp.put_f32_le(self.p2z);
26593        __tmp.put_u8(self.target_system);
26594        __tmp.put_u8(self.target_component);
26595        __tmp.put_u8(self.frame as u8);
26596        if matches!(version, MavlinkVersion::V2) {
26597            let len = __tmp.len();
26598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26599        } else {
26600            __tmp.len()
26601        }
26602    }
26603}
26604#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26605#[doc = ""]
26606#[doc = "ID: 26"]
26607#[derive(Debug, Clone, PartialEq)]
26608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26610#[cfg_attr(feature = "ts", derive(TS))]
26611#[cfg_attr(feature = "ts", ts(export))]
26612pub struct SCALED_IMU_DATA {
26613    #[doc = "Timestamp (time since system boot)."]
26614    pub time_boot_ms: u32,
26615    #[doc = "X acceleration"]
26616    pub xacc: i16,
26617    #[doc = "Y acceleration"]
26618    pub yacc: i16,
26619    #[doc = "Z acceleration"]
26620    pub zacc: i16,
26621    #[doc = "Angular speed around X axis"]
26622    pub xgyro: i16,
26623    #[doc = "Angular speed around Y axis"]
26624    pub ygyro: i16,
26625    #[doc = "Angular speed around Z axis"]
26626    pub zgyro: i16,
26627    #[doc = "X Magnetic field"]
26628    pub xmag: i16,
26629    #[doc = "Y Magnetic field"]
26630    pub ymag: i16,
26631    #[doc = "Z Magnetic field"]
26632    pub zmag: i16,
26633    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26635    pub temperature: i16,
26636}
26637impl SCALED_IMU_DATA {
26638    pub const ENCODED_LEN: usize = 24usize;
26639    pub const DEFAULT: Self = Self {
26640        time_boot_ms: 0_u32,
26641        xacc: 0_i16,
26642        yacc: 0_i16,
26643        zacc: 0_i16,
26644        xgyro: 0_i16,
26645        ygyro: 0_i16,
26646        zgyro: 0_i16,
26647        xmag: 0_i16,
26648        ymag: 0_i16,
26649        zmag: 0_i16,
26650        temperature: 0_i16,
26651    };
26652    #[cfg(feature = "arbitrary")]
26653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26654        use arbitrary::{Arbitrary, Unstructured};
26655        let mut buf = [0u8; 1024];
26656        rng.fill_bytes(&mut buf);
26657        let mut unstructured = Unstructured::new(&buf);
26658        Self::arbitrary(&mut unstructured).unwrap_or_default()
26659    }
26660}
26661impl Default for SCALED_IMU_DATA {
26662    fn default() -> Self {
26663        Self::DEFAULT.clone()
26664    }
26665}
26666impl MessageData for SCALED_IMU_DATA {
26667    type Message = MavMessage;
26668    const ID: u32 = 26u32;
26669    const NAME: &'static str = "SCALED_IMU";
26670    const EXTRA_CRC: u8 = 170u8;
26671    const ENCODED_LEN: usize = 24usize;
26672    fn deser(
26673        _version: MavlinkVersion,
26674        __input: &[u8],
26675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26676        let avail_len = __input.len();
26677        let mut payload_buf = [0; Self::ENCODED_LEN];
26678        let mut buf = if avail_len < Self::ENCODED_LEN {
26679            payload_buf[0..avail_len].copy_from_slice(__input);
26680            Bytes::new(&payload_buf)
26681        } else {
26682            Bytes::new(__input)
26683        };
26684        let mut __struct = Self::default();
26685        __struct.time_boot_ms = buf.get_u32_le();
26686        __struct.xacc = buf.get_i16_le();
26687        __struct.yacc = buf.get_i16_le();
26688        __struct.zacc = buf.get_i16_le();
26689        __struct.xgyro = buf.get_i16_le();
26690        __struct.ygyro = buf.get_i16_le();
26691        __struct.zgyro = buf.get_i16_le();
26692        __struct.xmag = buf.get_i16_le();
26693        __struct.ymag = buf.get_i16_le();
26694        __struct.zmag = buf.get_i16_le();
26695        __struct.temperature = buf.get_i16_le();
26696        Ok(__struct)
26697    }
26698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26699        let mut __tmp = BytesMut::new(bytes);
26700        #[allow(clippy::absurd_extreme_comparisons)]
26701        #[allow(unused_comparisons)]
26702        if __tmp.remaining() < Self::ENCODED_LEN {
26703            panic!(
26704                "buffer is too small (need {} bytes, but got {})",
26705                Self::ENCODED_LEN,
26706                __tmp.remaining(),
26707            )
26708        }
26709        __tmp.put_u32_le(self.time_boot_ms);
26710        __tmp.put_i16_le(self.xacc);
26711        __tmp.put_i16_le(self.yacc);
26712        __tmp.put_i16_le(self.zacc);
26713        __tmp.put_i16_le(self.xgyro);
26714        __tmp.put_i16_le(self.ygyro);
26715        __tmp.put_i16_le(self.zgyro);
26716        __tmp.put_i16_le(self.xmag);
26717        __tmp.put_i16_le(self.ymag);
26718        __tmp.put_i16_le(self.zmag);
26719        if matches!(version, MavlinkVersion::V2) {
26720            __tmp.put_i16_le(self.temperature);
26721            let len = __tmp.len();
26722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26723        } else {
26724            __tmp.len()
26725        }
26726    }
26727}
26728#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26729#[doc = ""]
26730#[doc = "ID: 116"]
26731#[derive(Debug, Clone, PartialEq)]
26732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26734#[cfg_attr(feature = "ts", derive(TS))]
26735#[cfg_attr(feature = "ts", ts(export))]
26736pub struct SCALED_IMU2_DATA {
26737    #[doc = "Timestamp (time since system boot)."]
26738    pub time_boot_ms: u32,
26739    #[doc = "X acceleration"]
26740    pub xacc: i16,
26741    #[doc = "Y acceleration"]
26742    pub yacc: i16,
26743    #[doc = "Z acceleration"]
26744    pub zacc: i16,
26745    #[doc = "Angular speed around X axis"]
26746    pub xgyro: i16,
26747    #[doc = "Angular speed around Y axis"]
26748    pub ygyro: i16,
26749    #[doc = "Angular speed around Z axis"]
26750    pub zgyro: i16,
26751    #[doc = "X Magnetic field"]
26752    pub xmag: i16,
26753    #[doc = "Y Magnetic field"]
26754    pub ymag: i16,
26755    #[doc = "Z Magnetic field"]
26756    pub zmag: i16,
26757    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26759    pub temperature: i16,
26760}
26761impl SCALED_IMU2_DATA {
26762    pub const ENCODED_LEN: usize = 24usize;
26763    pub const DEFAULT: Self = Self {
26764        time_boot_ms: 0_u32,
26765        xacc: 0_i16,
26766        yacc: 0_i16,
26767        zacc: 0_i16,
26768        xgyro: 0_i16,
26769        ygyro: 0_i16,
26770        zgyro: 0_i16,
26771        xmag: 0_i16,
26772        ymag: 0_i16,
26773        zmag: 0_i16,
26774        temperature: 0_i16,
26775    };
26776    #[cfg(feature = "arbitrary")]
26777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26778        use arbitrary::{Arbitrary, Unstructured};
26779        let mut buf = [0u8; 1024];
26780        rng.fill_bytes(&mut buf);
26781        let mut unstructured = Unstructured::new(&buf);
26782        Self::arbitrary(&mut unstructured).unwrap_or_default()
26783    }
26784}
26785impl Default for SCALED_IMU2_DATA {
26786    fn default() -> Self {
26787        Self::DEFAULT.clone()
26788    }
26789}
26790impl MessageData for SCALED_IMU2_DATA {
26791    type Message = MavMessage;
26792    const ID: u32 = 116u32;
26793    const NAME: &'static str = "SCALED_IMU2";
26794    const EXTRA_CRC: u8 = 76u8;
26795    const ENCODED_LEN: usize = 24usize;
26796    fn deser(
26797        _version: MavlinkVersion,
26798        __input: &[u8],
26799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26800        let avail_len = __input.len();
26801        let mut payload_buf = [0; Self::ENCODED_LEN];
26802        let mut buf = if avail_len < Self::ENCODED_LEN {
26803            payload_buf[0..avail_len].copy_from_slice(__input);
26804            Bytes::new(&payload_buf)
26805        } else {
26806            Bytes::new(__input)
26807        };
26808        let mut __struct = Self::default();
26809        __struct.time_boot_ms = buf.get_u32_le();
26810        __struct.xacc = buf.get_i16_le();
26811        __struct.yacc = buf.get_i16_le();
26812        __struct.zacc = buf.get_i16_le();
26813        __struct.xgyro = buf.get_i16_le();
26814        __struct.ygyro = buf.get_i16_le();
26815        __struct.zgyro = buf.get_i16_le();
26816        __struct.xmag = buf.get_i16_le();
26817        __struct.ymag = buf.get_i16_le();
26818        __struct.zmag = buf.get_i16_le();
26819        __struct.temperature = buf.get_i16_le();
26820        Ok(__struct)
26821    }
26822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26823        let mut __tmp = BytesMut::new(bytes);
26824        #[allow(clippy::absurd_extreme_comparisons)]
26825        #[allow(unused_comparisons)]
26826        if __tmp.remaining() < Self::ENCODED_LEN {
26827            panic!(
26828                "buffer is too small (need {} bytes, but got {})",
26829                Self::ENCODED_LEN,
26830                __tmp.remaining(),
26831            )
26832        }
26833        __tmp.put_u32_le(self.time_boot_ms);
26834        __tmp.put_i16_le(self.xacc);
26835        __tmp.put_i16_le(self.yacc);
26836        __tmp.put_i16_le(self.zacc);
26837        __tmp.put_i16_le(self.xgyro);
26838        __tmp.put_i16_le(self.ygyro);
26839        __tmp.put_i16_le(self.zgyro);
26840        __tmp.put_i16_le(self.xmag);
26841        __tmp.put_i16_le(self.ymag);
26842        __tmp.put_i16_le(self.zmag);
26843        if matches!(version, MavlinkVersion::V2) {
26844            __tmp.put_i16_le(self.temperature);
26845            let len = __tmp.len();
26846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26847        } else {
26848            __tmp.len()
26849        }
26850    }
26851}
26852#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26853#[doc = ""]
26854#[doc = "ID: 129"]
26855#[derive(Debug, Clone, PartialEq)]
26856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26858#[cfg_attr(feature = "ts", derive(TS))]
26859#[cfg_attr(feature = "ts", ts(export))]
26860pub struct SCALED_IMU3_DATA {
26861    #[doc = "Timestamp (time since system boot)."]
26862    pub time_boot_ms: u32,
26863    #[doc = "X acceleration"]
26864    pub xacc: i16,
26865    #[doc = "Y acceleration"]
26866    pub yacc: i16,
26867    #[doc = "Z acceleration"]
26868    pub zacc: i16,
26869    #[doc = "Angular speed around X axis"]
26870    pub xgyro: i16,
26871    #[doc = "Angular speed around Y axis"]
26872    pub ygyro: i16,
26873    #[doc = "Angular speed around Z axis"]
26874    pub zgyro: i16,
26875    #[doc = "X Magnetic field"]
26876    pub xmag: i16,
26877    #[doc = "Y Magnetic field"]
26878    pub ymag: i16,
26879    #[doc = "Z Magnetic field"]
26880    pub zmag: i16,
26881    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26883    pub temperature: i16,
26884}
26885impl SCALED_IMU3_DATA {
26886    pub const ENCODED_LEN: usize = 24usize;
26887    pub const DEFAULT: Self = Self {
26888        time_boot_ms: 0_u32,
26889        xacc: 0_i16,
26890        yacc: 0_i16,
26891        zacc: 0_i16,
26892        xgyro: 0_i16,
26893        ygyro: 0_i16,
26894        zgyro: 0_i16,
26895        xmag: 0_i16,
26896        ymag: 0_i16,
26897        zmag: 0_i16,
26898        temperature: 0_i16,
26899    };
26900    #[cfg(feature = "arbitrary")]
26901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26902        use arbitrary::{Arbitrary, Unstructured};
26903        let mut buf = [0u8; 1024];
26904        rng.fill_bytes(&mut buf);
26905        let mut unstructured = Unstructured::new(&buf);
26906        Self::arbitrary(&mut unstructured).unwrap_or_default()
26907    }
26908}
26909impl Default for SCALED_IMU3_DATA {
26910    fn default() -> Self {
26911        Self::DEFAULT.clone()
26912    }
26913}
26914impl MessageData for SCALED_IMU3_DATA {
26915    type Message = MavMessage;
26916    const ID: u32 = 129u32;
26917    const NAME: &'static str = "SCALED_IMU3";
26918    const EXTRA_CRC: u8 = 46u8;
26919    const ENCODED_LEN: usize = 24usize;
26920    fn deser(
26921        _version: MavlinkVersion,
26922        __input: &[u8],
26923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26924        let avail_len = __input.len();
26925        let mut payload_buf = [0; Self::ENCODED_LEN];
26926        let mut buf = if avail_len < Self::ENCODED_LEN {
26927            payload_buf[0..avail_len].copy_from_slice(__input);
26928            Bytes::new(&payload_buf)
26929        } else {
26930            Bytes::new(__input)
26931        };
26932        let mut __struct = Self::default();
26933        __struct.time_boot_ms = buf.get_u32_le();
26934        __struct.xacc = buf.get_i16_le();
26935        __struct.yacc = buf.get_i16_le();
26936        __struct.zacc = buf.get_i16_le();
26937        __struct.xgyro = buf.get_i16_le();
26938        __struct.ygyro = buf.get_i16_le();
26939        __struct.zgyro = buf.get_i16_le();
26940        __struct.xmag = buf.get_i16_le();
26941        __struct.ymag = buf.get_i16_le();
26942        __struct.zmag = buf.get_i16_le();
26943        __struct.temperature = buf.get_i16_le();
26944        Ok(__struct)
26945    }
26946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26947        let mut __tmp = BytesMut::new(bytes);
26948        #[allow(clippy::absurd_extreme_comparisons)]
26949        #[allow(unused_comparisons)]
26950        if __tmp.remaining() < Self::ENCODED_LEN {
26951            panic!(
26952                "buffer is too small (need {} bytes, but got {})",
26953                Self::ENCODED_LEN,
26954                __tmp.remaining(),
26955            )
26956        }
26957        __tmp.put_u32_le(self.time_boot_ms);
26958        __tmp.put_i16_le(self.xacc);
26959        __tmp.put_i16_le(self.yacc);
26960        __tmp.put_i16_le(self.zacc);
26961        __tmp.put_i16_le(self.xgyro);
26962        __tmp.put_i16_le(self.ygyro);
26963        __tmp.put_i16_le(self.zgyro);
26964        __tmp.put_i16_le(self.xmag);
26965        __tmp.put_i16_le(self.ymag);
26966        __tmp.put_i16_le(self.zmag);
26967        if matches!(version, MavlinkVersion::V2) {
26968            __tmp.put_i16_le(self.temperature);
26969            let len = __tmp.len();
26970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26971        } else {
26972            __tmp.len()
26973        }
26974    }
26975}
26976#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26977#[doc = ""]
26978#[doc = "ID: 29"]
26979#[derive(Debug, Clone, PartialEq)]
26980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26982#[cfg_attr(feature = "ts", derive(TS))]
26983#[cfg_attr(feature = "ts", ts(export))]
26984pub struct SCALED_PRESSURE_DATA {
26985    #[doc = "Timestamp (time since system boot)."]
26986    pub time_boot_ms: u32,
26987    #[doc = "Absolute pressure"]
26988    pub press_abs: f32,
26989    #[doc = "Differential pressure 1"]
26990    pub press_diff: f32,
26991    #[doc = "Absolute pressure temperature"]
26992    pub temperature: i16,
26993    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26995    pub temperature_press_diff: i16,
26996}
26997impl SCALED_PRESSURE_DATA {
26998    pub const ENCODED_LEN: usize = 16usize;
26999    pub const DEFAULT: Self = Self {
27000        time_boot_ms: 0_u32,
27001        press_abs: 0.0_f32,
27002        press_diff: 0.0_f32,
27003        temperature: 0_i16,
27004        temperature_press_diff: 0_i16,
27005    };
27006    #[cfg(feature = "arbitrary")]
27007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27008        use arbitrary::{Arbitrary, Unstructured};
27009        let mut buf = [0u8; 1024];
27010        rng.fill_bytes(&mut buf);
27011        let mut unstructured = Unstructured::new(&buf);
27012        Self::arbitrary(&mut unstructured).unwrap_or_default()
27013    }
27014}
27015impl Default for SCALED_PRESSURE_DATA {
27016    fn default() -> Self {
27017        Self::DEFAULT.clone()
27018    }
27019}
27020impl MessageData for SCALED_PRESSURE_DATA {
27021    type Message = MavMessage;
27022    const ID: u32 = 29u32;
27023    const NAME: &'static str = "SCALED_PRESSURE";
27024    const EXTRA_CRC: u8 = 115u8;
27025    const ENCODED_LEN: usize = 16usize;
27026    fn deser(
27027        _version: MavlinkVersion,
27028        __input: &[u8],
27029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27030        let avail_len = __input.len();
27031        let mut payload_buf = [0; Self::ENCODED_LEN];
27032        let mut buf = if avail_len < Self::ENCODED_LEN {
27033            payload_buf[0..avail_len].copy_from_slice(__input);
27034            Bytes::new(&payload_buf)
27035        } else {
27036            Bytes::new(__input)
27037        };
27038        let mut __struct = Self::default();
27039        __struct.time_boot_ms = buf.get_u32_le();
27040        __struct.press_abs = buf.get_f32_le();
27041        __struct.press_diff = buf.get_f32_le();
27042        __struct.temperature = buf.get_i16_le();
27043        __struct.temperature_press_diff = buf.get_i16_le();
27044        Ok(__struct)
27045    }
27046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27047        let mut __tmp = BytesMut::new(bytes);
27048        #[allow(clippy::absurd_extreme_comparisons)]
27049        #[allow(unused_comparisons)]
27050        if __tmp.remaining() < Self::ENCODED_LEN {
27051            panic!(
27052                "buffer is too small (need {} bytes, but got {})",
27053                Self::ENCODED_LEN,
27054                __tmp.remaining(),
27055            )
27056        }
27057        __tmp.put_u32_le(self.time_boot_ms);
27058        __tmp.put_f32_le(self.press_abs);
27059        __tmp.put_f32_le(self.press_diff);
27060        __tmp.put_i16_le(self.temperature);
27061        if matches!(version, MavlinkVersion::V2) {
27062            __tmp.put_i16_le(self.temperature_press_diff);
27063            let len = __tmp.len();
27064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27065        } else {
27066            __tmp.len()
27067        }
27068    }
27069}
27070#[doc = "Barometer readings for 2nd barometer."]
27071#[doc = ""]
27072#[doc = "ID: 137"]
27073#[derive(Debug, Clone, PartialEq)]
27074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27076#[cfg_attr(feature = "ts", derive(TS))]
27077#[cfg_attr(feature = "ts", ts(export))]
27078pub struct SCALED_PRESSURE2_DATA {
27079    #[doc = "Timestamp (time since system boot)."]
27080    pub time_boot_ms: u32,
27081    #[doc = "Absolute pressure"]
27082    pub press_abs: f32,
27083    #[doc = "Differential pressure"]
27084    pub press_diff: f32,
27085    #[doc = "Absolute pressure temperature"]
27086    pub temperature: i16,
27087    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27089    pub temperature_press_diff: i16,
27090}
27091impl SCALED_PRESSURE2_DATA {
27092    pub const ENCODED_LEN: usize = 16usize;
27093    pub const DEFAULT: Self = Self {
27094        time_boot_ms: 0_u32,
27095        press_abs: 0.0_f32,
27096        press_diff: 0.0_f32,
27097        temperature: 0_i16,
27098        temperature_press_diff: 0_i16,
27099    };
27100    #[cfg(feature = "arbitrary")]
27101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27102        use arbitrary::{Arbitrary, Unstructured};
27103        let mut buf = [0u8; 1024];
27104        rng.fill_bytes(&mut buf);
27105        let mut unstructured = Unstructured::new(&buf);
27106        Self::arbitrary(&mut unstructured).unwrap_or_default()
27107    }
27108}
27109impl Default for SCALED_PRESSURE2_DATA {
27110    fn default() -> Self {
27111        Self::DEFAULT.clone()
27112    }
27113}
27114impl MessageData for SCALED_PRESSURE2_DATA {
27115    type Message = MavMessage;
27116    const ID: u32 = 137u32;
27117    const NAME: &'static str = "SCALED_PRESSURE2";
27118    const EXTRA_CRC: u8 = 195u8;
27119    const ENCODED_LEN: usize = 16usize;
27120    fn deser(
27121        _version: MavlinkVersion,
27122        __input: &[u8],
27123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27124        let avail_len = __input.len();
27125        let mut payload_buf = [0; Self::ENCODED_LEN];
27126        let mut buf = if avail_len < Self::ENCODED_LEN {
27127            payload_buf[0..avail_len].copy_from_slice(__input);
27128            Bytes::new(&payload_buf)
27129        } else {
27130            Bytes::new(__input)
27131        };
27132        let mut __struct = Self::default();
27133        __struct.time_boot_ms = buf.get_u32_le();
27134        __struct.press_abs = buf.get_f32_le();
27135        __struct.press_diff = buf.get_f32_le();
27136        __struct.temperature = buf.get_i16_le();
27137        __struct.temperature_press_diff = buf.get_i16_le();
27138        Ok(__struct)
27139    }
27140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27141        let mut __tmp = BytesMut::new(bytes);
27142        #[allow(clippy::absurd_extreme_comparisons)]
27143        #[allow(unused_comparisons)]
27144        if __tmp.remaining() < Self::ENCODED_LEN {
27145            panic!(
27146                "buffer is too small (need {} bytes, but got {})",
27147                Self::ENCODED_LEN,
27148                __tmp.remaining(),
27149            )
27150        }
27151        __tmp.put_u32_le(self.time_boot_ms);
27152        __tmp.put_f32_le(self.press_abs);
27153        __tmp.put_f32_le(self.press_diff);
27154        __tmp.put_i16_le(self.temperature);
27155        if matches!(version, MavlinkVersion::V2) {
27156            __tmp.put_i16_le(self.temperature_press_diff);
27157            let len = __tmp.len();
27158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27159        } else {
27160            __tmp.len()
27161        }
27162    }
27163}
27164#[doc = "Barometer readings for 3rd barometer."]
27165#[doc = ""]
27166#[doc = "ID: 143"]
27167#[derive(Debug, Clone, PartialEq)]
27168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27170#[cfg_attr(feature = "ts", derive(TS))]
27171#[cfg_attr(feature = "ts", ts(export))]
27172pub struct SCALED_PRESSURE3_DATA {
27173    #[doc = "Timestamp (time since system boot)."]
27174    pub time_boot_ms: u32,
27175    #[doc = "Absolute pressure"]
27176    pub press_abs: f32,
27177    #[doc = "Differential pressure"]
27178    pub press_diff: f32,
27179    #[doc = "Absolute pressure temperature"]
27180    pub temperature: i16,
27181    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27183    pub temperature_press_diff: i16,
27184}
27185impl SCALED_PRESSURE3_DATA {
27186    pub const ENCODED_LEN: usize = 16usize;
27187    pub const DEFAULT: Self = Self {
27188        time_boot_ms: 0_u32,
27189        press_abs: 0.0_f32,
27190        press_diff: 0.0_f32,
27191        temperature: 0_i16,
27192        temperature_press_diff: 0_i16,
27193    };
27194    #[cfg(feature = "arbitrary")]
27195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27196        use arbitrary::{Arbitrary, Unstructured};
27197        let mut buf = [0u8; 1024];
27198        rng.fill_bytes(&mut buf);
27199        let mut unstructured = Unstructured::new(&buf);
27200        Self::arbitrary(&mut unstructured).unwrap_or_default()
27201    }
27202}
27203impl Default for SCALED_PRESSURE3_DATA {
27204    fn default() -> Self {
27205        Self::DEFAULT.clone()
27206    }
27207}
27208impl MessageData for SCALED_PRESSURE3_DATA {
27209    type Message = MavMessage;
27210    const ID: u32 = 143u32;
27211    const NAME: &'static str = "SCALED_PRESSURE3";
27212    const EXTRA_CRC: u8 = 131u8;
27213    const ENCODED_LEN: usize = 16usize;
27214    fn deser(
27215        _version: MavlinkVersion,
27216        __input: &[u8],
27217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27218        let avail_len = __input.len();
27219        let mut payload_buf = [0; Self::ENCODED_LEN];
27220        let mut buf = if avail_len < Self::ENCODED_LEN {
27221            payload_buf[0..avail_len].copy_from_slice(__input);
27222            Bytes::new(&payload_buf)
27223        } else {
27224            Bytes::new(__input)
27225        };
27226        let mut __struct = Self::default();
27227        __struct.time_boot_ms = buf.get_u32_le();
27228        __struct.press_abs = buf.get_f32_le();
27229        __struct.press_diff = buf.get_f32_le();
27230        __struct.temperature = buf.get_i16_le();
27231        __struct.temperature_press_diff = buf.get_i16_le();
27232        Ok(__struct)
27233    }
27234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27235        let mut __tmp = BytesMut::new(bytes);
27236        #[allow(clippy::absurd_extreme_comparisons)]
27237        #[allow(unused_comparisons)]
27238        if __tmp.remaining() < Self::ENCODED_LEN {
27239            panic!(
27240                "buffer is too small (need {} bytes, but got {})",
27241                Self::ENCODED_LEN,
27242                __tmp.remaining(),
27243            )
27244        }
27245        __tmp.put_u32_le(self.time_boot_ms);
27246        __tmp.put_f32_le(self.press_abs);
27247        __tmp.put_f32_le(self.press_diff);
27248        __tmp.put_i16_le(self.temperature);
27249        if matches!(version, MavlinkVersion::V2) {
27250            __tmp.put_i16_le(self.temperature_press_diff);
27251            let len = __tmp.len();
27252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27253        } else {
27254            __tmp.len()
27255        }
27256    }
27257}
27258#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27259#[doc = ""]
27260#[doc = "ID: 126"]
27261#[derive(Debug, Clone, PartialEq)]
27262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27264#[cfg_attr(feature = "ts", derive(TS))]
27265#[cfg_attr(feature = "ts", ts(export))]
27266pub struct SERIAL_CONTROL_DATA {
27267    #[doc = "Baudrate of transfer. Zero means no change."]
27268    pub baudrate: u32,
27269    #[doc = "Timeout for reply data"]
27270    pub timeout: u16,
27271    #[doc = "Serial control device type."]
27272    pub device: SerialControlDev,
27273    #[doc = "Bitmap of serial control flags."]
27274    pub flags: SerialControlFlag,
27275    #[doc = "how many bytes in this transfer"]
27276    pub count: u8,
27277    #[doc = "serial data"]
27278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27280    pub data: [u8; 70],
27281    #[doc = "System ID"]
27282    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27283    pub target_system: u8,
27284    #[doc = "Component ID"]
27285    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27286    pub target_component: u8,
27287}
27288impl SERIAL_CONTROL_DATA {
27289    pub const ENCODED_LEN: usize = 81usize;
27290    pub const DEFAULT: Self = Self {
27291        baudrate: 0_u32,
27292        timeout: 0_u16,
27293        device: SerialControlDev::DEFAULT,
27294        flags: SerialControlFlag::DEFAULT,
27295        count: 0_u8,
27296        data: [0_u8; 70usize],
27297        target_system: 0_u8,
27298        target_component: 0_u8,
27299    };
27300    #[cfg(feature = "arbitrary")]
27301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27302        use arbitrary::{Arbitrary, Unstructured};
27303        let mut buf = [0u8; 1024];
27304        rng.fill_bytes(&mut buf);
27305        let mut unstructured = Unstructured::new(&buf);
27306        Self::arbitrary(&mut unstructured).unwrap_or_default()
27307    }
27308}
27309impl Default for SERIAL_CONTROL_DATA {
27310    fn default() -> Self {
27311        Self::DEFAULT.clone()
27312    }
27313}
27314impl MessageData for SERIAL_CONTROL_DATA {
27315    type Message = MavMessage;
27316    const ID: u32 = 126u32;
27317    const NAME: &'static str = "SERIAL_CONTROL";
27318    const EXTRA_CRC: u8 = 220u8;
27319    const ENCODED_LEN: usize = 81usize;
27320    fn deser(
27321        _version: MavlinkVersion,
27322        __input: &[u8],
27323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27324        let avail_len = __input.len();
27325        let mut payload_buf = [0; Self::ENCODED_LEN];
27326        let mut buf = if avail_len < Self::ENCODED_LEN {
27327            payload_buf[0..avail_len].copy_from_slice(__input);
27328            Bytes::new(&payload_buf)
27329        } else {
27330            Bytes::new(__input)
27331        };
27332        let mut __struct = Self::default();
27333        __struct.baudrate = buf.get_u32_le();
27334        __struct.timeout = buf.get_u16_le();
27335        let tmp = buf.get_u8();
27336        __struct.device =
27337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27338                enum_type: "SerialControlDev",
27339                value: tmp as u32,
27340            })?;
27341        let tmp = buf.get_u8();
27342        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27343            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27344                flag_type: "SerialControlFlag",
27345                value: tmp as u32,
27346            })?;
27347        __struct.count = buf.get_u8();
27348        for v in &mut __struct.data {
27349            let val = buf.get_u8();
27350            *v = val;
27351        }
27352        __struct.target_system = buf.get_u8();
27353        __struct.target_component = buf.get_u8();
27354        Ok(__struct)
27355    }
27356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27357        let mut __tmp = BytesMut::new(bytes);
27358        #[allow(clippy::absurd_extreme_comparisons)]
27359        #[allow(unused_comparisons)]
27360        if __tmp.remaining() < Self::ENCODED_LEN {
27361            panic!(
27362                "buffer is too small (need {} bytes, but got {})",
27363                Self::ENCODED_LEN,
27364                __tmp.remaining(),
27365            )
27366        }
27367        __tmp.put_u32_le(self.baudrate);
27368        __tmp.put_u16_le(self.timeout);
27369        __tmp.put_u8(self.device as u8);
27370        __tmp.put_u8(self.flags.bits());
27371        __tmp.put_u8(self.count);
27372        for val in &self.data {
27373            __tmp.put_u8(*val);
27374        }
27375        if matches!(version, MavlinkVersion::V2) {
27376            __tmp.put_u8(self.target_system);
27377            __tmp.put_u8(self.target_component);
27378            let len = __tmp.len();
27379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27380        } else {
27381            __tmp.len()
27382        }
27383    }
27384}
27385#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27386#[doc = ""]
27387#[doc = "ID: 36"]
27388#[derive(Debug, Clone, PartialEq)]
27389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27391#[cfg_attr(feature = "ts", derive(TS))]
27392#[cfg_attr(feature = "ts", ts(export))]
27393pub struct SERVO_OUTPUT_RAW_DATA {
27394    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27395    pub time_usec: u32,
27396    #[doc = "Servo output 1 value"]
27397    pub servo1_raw: u16,
27398    #[doc = "Servo output 2 value"]
27399    pub servo2_raw: u16,
27400    #[doc = "Servo output 3 value"]
27401    pub servo3_raw: u16,
27402    #[doc = "Servo output 4 value"]
27403    pub servo4_raw: u16,
27404    #[doc = "Servo output 5 value"]
27405    pub servo5_raw: u16,
27406    #[doc = "Servo output 6 value"]
27407    pub servo6_raw: u16,
27408    #[doc = "Servo output 7 value"]
27409    pub servo7_raw: u16,
27410    #[doc = "Servo output 8 value"]
27411    pub servo8_raw: u16,
27412    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27413    pub port: u8,
27414    #[doc = "Servo output 9 value"]
27415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27416    pub servo9_raw: u16,
27417    #[doc = "Servo output 10 value"]
27418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27419    pub servo10_raw: u16,
27420    #[doc = "Servo output 11 value"]
27421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27422    pub servo11_raw: u16,
27423    #[doc = "Servo output 12 value"]
27424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27425    pub servo12_raw: u16,
27426    #[doc = "Servo output 13 value"]
27427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27428    pub servo13_raw: u16,
27429    #[doc = "Servo output 14 value"]
27430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27431    pub servo14_raw: u16,
27432    #[doc = "Servo output 15 value"]
27433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27434    pub servo15_raw: u16,
27435    #[doc = "Servo output 16 value"]
27436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27437    pub servo16_raw: u16,
27438}
27439impl SERVO_OUTPUT_RAW_DATA {
27440    pub const ENCODED_LEN: usize = 37usize;
27441    pub const DEFAULT: Self = Self {
27442        time_usec: 0_u32,
27443        servo1_raw: 0_u16,
27444        servo2_raw: 0_u16,
27445        servo3_raw: 0_u16,
27446        servo4_raw: 0_u16,
27447        servo5_raw: 0_u16,
27448        servo6_raw: 0_u16,
27449        servo7_raw: 0_u16,
27450        servo8_raw: 0_u16,
27451        port: 0_u8,
27452        servo9_raw: 0_u16,
27453        servo10_raw: 0_u16,
27454        servo11_raw: 0_u16,
27455        servo12_raw: 0_u16,
27456        servo13_raw: 0_u16,
27457        servo14_raw: 0_u16,
27458        servo15_raw: 0_u16,
27459        servo16_raw: 0_u16,
27460    };
27461    #[cfg(feature = "arbitrary")]
27462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27463        use arbitrary::{Arbitrary, Unstructured};
27464        let mut buf = [0u8; 1024];
27465        rng.fill_bytes(&mut buf);
27466        let mut unstructured = Unstructured::new(&buf);
27467        Self::arbitrary(&mut unstructured).unwrap_or_default()
27468    }
27469}
27470impl Default for SERVO_OUTPUT_RAW_DATA {
27471    fn default() -> Self {
27472        Self::DEFAULT.clone()
27473    }
27474}
27475impl MessageData for SERVO_OUTPUT_RAW_DATA {
27476    type Message = MavMessage;
27477    const ID: u32 = 36u32;
27478    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27479    const EXTRA_CRC: u8 = 222u8;
27480    const ENCODED_LEN: usize = 37usize;
27481    fn deser(
27482        _version: MavlinkVersion,
27483        __input: &[u8],
27484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27485        let avail_len = __input.len();
27486        let mut payload_buf = [0; Self::ENCODED_LEN];
27487        let mut buf = if avail_len < Self::ENCODED_LEN {
27488            payload_buf[0..avail_len].copy_from_slice(__input);
27489            Bytes::new(&payload_buf)
27490        } else {
27491            Bytes::new(__input)
27492        };
27493        let mut __struct = Self::default();
27494        __struct.time_usec = buf.get_u32_le();
27495        __struct.servo1_raw = buf.get_u16_le();
27496        __struct.servo2_raw = buf.get_u16_le();
27497        __struct.servo3_raw = buf.get_u16_le();
27498        __struct.servo4_raw = buf.get_u16_le();
27499        __struct.servo5_raw = buf.get_u16_le();
27500        __struct.servo6_raw = buf.get_u16_le();
27501        __struct.servo7_raw = buf.get_u16_le();
27502        __struct.servo8_raw = buf.get_u16_le();
27503        __struct.port = buf.get_u8();
27504        __struct.servo9_raw = buf.get_u16_le();
27505        __struct.servo10_raw = buf.get_u16_le();
27506        __struct.servo11_raw = buf.get_u16_le();
27507        __struct.servo12_raw = buf.get_u16_le();
27508        __struct.servo13_raw = buf.get_u16_le();
27509        __struct.servo14_raw = buf.get_u16_le();
27510        __struct.servo15_raw = buf.get_u16_le();
27511        __struct.servo16_raw = buf.get_u16_le();
27512        Ok(__struct)
27513    }
27514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27515        let mut __tmp = BytesMut::new(bytes);
27516        #[allow(clippy::absurd_extreme_comparisons)]
27517        #[allow(unused_comparisons)]
27518        if __tmp.remaining() < Self::ENCODED_LEN {
27519            panic!(
27520                "buffer is too small (need {} bytes, but got {})",
27521                Self::ENCODED_LEN,
27522                __tmp.remaining(),
27523            )
27524        }
27525        __tmp.put_u32_le(self.time_usec);
27526        __tmp.put_u16_le(self.servo1_raw);
27527        __tmp.put_u16_le(self.servo2_raw);
27528        __tmp.put_u16_le(self.servo3_raw);
27529        __tmp.put_u16_le(self.servo4_raw);
27530        __tmp.put_u16_le(self.servo5_raw);
27531        __tmp.put_u16_le(self.servo6_raw);
27532        __tmp.put_u16_le(self.servo7_raw);
27533        __tmp.put_u16_le(self.servo8_raw);
27534        __tmp.put_u8(self.port);
27535        if matches!(version, MavlinkVersion::V2) {
27536            __tmp.put_u16_le(self.servo9_raw);
27537            __tmp.put_u16_le(self.servo10_raw);
27538            __tmp.put_u16_le(self.servo11_raw);
27539            __tmp.put_u16_le(self.servo12_raw);
27540            __tmp.put_u16_le(self.servo13_raw);
27541            __tmp.put_u16_le(self.servo14_raw);
27542            __tmp.put_u16_le(self.servo15_raw);
27543            __tmp.put_u16_le(self.servo16_raw);
27544            let len = __tmp.len();
27545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27546        } else {
27547            __tmp.len()
27548        }
27549    }
27550}
27551#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27552#[doc = ""]
27553#[doc = "ID: 256"]
27554#[derive(Debug, Clone, PartialEq)]
27555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27557#[cfg_attr(feature = "ts", derive(TS))]
27558#[cfg_attr(feature = "ts", ts(export))]
27559pub struct SETUP_SIGNING_DATA {
27560    #[doc = "initial timestamp"]
27561    pub initial_timestamp: u64,
27562    #[doc = "system id of the target"]
27563    pub target_system: u8,
27564    #[doc = "component ID of the target"]
27565    pub target_component: u8,
27566    #[doc = "signing key"]
27567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27569    pub secret_key: [u8; 32],
27570}
27571impl SETUP_SIGNING_DATA {
27572    pub const ENCODED_LEN: usize = 42usize;
27573    pub const DEFAULT: Self = Self {
27574        initial_timestamp: 0_u64,
27575        target_system: 0_u8,
27576        target_component: 0_u8,
27577        secret_key: [0_u8; 32usize],
27578    };
27579    #[cfg(feature = "arbitrary")]
27580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27581        use arbitrary::{Arbitrary, Unstructured};
27582        let mut buf = [0u8; 1024];
27583        rng.fill_bytes(&mut buf);
27584        let mut unstructured = Unstructured::new(&buf);
27585        Self::arbitrary(&mut unstructured).unwrap_or_default()
27586    }
27587}
27588impl Default for SETUP_SIGNING_DATA {
27589    fn default() -> Self {
27590        Self::DEFAULT.clone()
27591    }
27592}
27593impl MessageData for SETUP_SIGNING_DATA {
27594    type Message = MavMessage;
27595    const ID: u32 = 256u32;
27596    const NAME: &'static str = "SETUP_SIGNING";
27597    const EXTRA_CRC: u8 = 71u8;
27598    const ENCODED_LEN: usize = 42usize;
27599    fn deser(
27600        _version: MavlinkVersion,
27601        __input: &[u8],
27602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27603        let avail_len = __input.len();
27604        let mut payload_buf = [0; Self::ENCODED_LEN];
27605        let mut buf = if avail_len < Self::ENCODED_LEN {
27606            payload_buf[0..avail_len].copy_from_slice(__input);
27607            Bytes::new(&payload_buf)
27608        } else {
27609            Bytes::new(__input)
27610        };
27611        let mut __struct = Self::default();
27612        __struct.initial_timestamp = buf.get_u64_le();
27613        __struct.target_system = buf.get_u8();
27614        __struct.target_component = buf.get_u8();
27615        for v in &mut __struct.secret_key {
27616            let val = buf.get_u8();
27617            *v = val;
27618        }
27619        Ok(__struct)
27620    }
27621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27622        let mut __tmp = BytesMut::new(bytes);
27623        #[allow(clippy::absurd_extreme_comparisons)]
27624        #[allow(unused_comparisons)]
27625        if __tmp.remaining() < Self::ENCODED_LEN {
27626            panic!(
27627                "buffer is too small (need {} bytes, but got {})",
27628                Self::ENCODED_LEN,
27629                __tmp.remaining(),
27630            )
27631        }
27632        __tmp.put_u64_le(self.initial_timestamp);
27633        __tmp.put_u8(self.target_system);
27634        __tmp.put_u8(self.target_component);
27635        for val in &self.secret_key {
27636            __tmp.put_u8(*val);
27637        }
27638        if matches!(version, MavlinkVersion::V2) {
27639            let len = __tmp.len();
27640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27641        } else {
27642            __tmp.len()
27643        }
27644    }
27645}
27646#[doc = "Set the vehicle attitude and body angular rates."]
27647#[doc = ""]
27648#[doc = "ID: 139"]
27649#[derive(Debug, Clone, PartialEq)]
27650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27652#[cfg_attr(feature = "ts", derive(TS))]
27653#[cfg_attr(feature = "ts", ts(export))]
27654pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27655    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27656    pub time_usec: u64,
27657    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27660    pub controls: [f32; 8],
27661    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27662    pub group_mlx: u8,
27663    #[doc = "System ID"]
27664    pub target_system: u8,
27665    #[doc = "Component ID"]
27666    pub target_component: u8,
27667}
27668impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27669    pub const ENCODED_LEN: usize = 43usize;
27670    pub const DEFAULT: Self = Self {
27671        time_usec: 0_u64,
27672        controls: [0.0_f32; 8usize],
27673        group_mlx: 0_u8,
27674        target_system: 0_u8,
27675        target_component: 0_u8,
27676    };
27677    #[cfg(feature = "arbitrary")]
27678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27679        use arbitrary::{Arbitrary, Unstructured};
27680        let mut buf = [0u8; 1024];
27681        rng.fill_bytes(&mut buf);
27682        let mut unstructured = Unstructured::new(&buf);
27683        Self::arbitrary(&mut unstructured).unwrap_or_default()
27684    }
27685}
27686impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27687    fn default() -> Self {
27688        Self::DEFAULT.clone()
27689    }
27690}
27691impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27692    type Message = MavMessage;
27693    const ID: u32 = 139u32;
27694    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27695    const EXTRA_CRC: u8 = 168u8;
27696    const ENCODED_LEN: usize = 43usize;
27697    fn deser(
27698        _version: MavlinkVersion,
27699        __input: &[u8],
27700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27701        let avail_len = __input.len();
27702        let mut payload_buf = [0; Self::ENCODED_LEN];
27703        let mut buf = if avail_len < Self::ENCODED_LEN {
27704            payload_buf[0..avail_len].copy_from_slice(__input);
27705            Bytes::new(&payload_buf)
27706        } else {
27707            Bytes::new(__input)
27708        };
27709        let mut __struct = Self::default();
27710        __struct.time_usec = buf.get_u64_le();
27711        for v in &mut __struct.controls {
27712            let val = buf.get_f32_le();
27713            *v = val;
27714        }
27715        __struct.group_mlx = buf.get_u8();
27716        __struct.target_system = buf.get_u8();
27717        __struct.target_component = buf.get_u8();
27718        Ok(__struct)
27719    }
27720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27721        let mut __tmp = BytesMut::new(bytes);
27722        #[allow(clippy::absurd_extreme_comparisons)]
27723        #[allow(unused_comparisons)]
27724        if __tmp.remaining() < Self::ENCODED_LEN {
27725            panic!(
27726                "buffer is too small (need {} bytes, but got {})",
27727                Self::ENCODED_LEN,
27728                __tmp.remaining(),
27729            )
27730        }
27731        __tmp.put_u64_le(self.time_usec);
27732        for val in &self.controls {
27733            __tmp.put_f32_le(*val);
27734        }
27735        __tmp.put_u8(self.group_mlx);
27736        __tmp.put_u8(self.target_system);
27737        __tmp.put_u8(self.target_component);
27738        if matches!(version, MavlinkVersion::V2) {
27739            let len = __tmp.len();
27740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27741        } else {
27742            __tmp.len()
27743        }
27744    }
27745}
27746#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27747#[doc = ""]
27748#[doc = "ID: 82"]
27749#[derive(Debug, Clone, PartialEq)]
27750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27752#[cfg_attr(feature = "ts", derive(TS))]
27753#[cfg_attr(feature = "ts", ts(export))]
27754pub struct SET_ATTITUDE_TARGET_DATA {
27755    #[doc = "Timestamp (time since system boot)."]
27756    pub time_boot_ms: u32,
27757    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27760    pub q: [f32; 4],
27761    #[doc = "Body roll rate"]
27762    pub body_roll_rate: f32,
27763    #[doc = "Body pitch rate"]
27764    pub body_pitch_rate: f32,
27765    #[doc = "Body yaw rate"]
27766    pub body_yaw_rate: f32,
27767    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27768    pub thrust: f32,
27769    #[doc = "System ID"]
27770    pub target_system: u8,
27771    #[doc = "Component ID"]
27772    pub target_component: u8,
27773    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27774    pub type_mask: AttitudeTargetTypemask,
27775    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27779    pub thrust_body: [f32; 3],
27780}
27781impl SET_ATTITUDE_TARGET_DATA {
27782    pub const ENCODED_LEN: usize = 51usize;
27783    pub const DEFAULT: Self = Self {
27784        time_boot_ms: 0_u32,
27785        q: [0.0_f32; 4usize],
27786        body_roll_rate: 0.0_f32,
27787        body_pitch_rate: 0.0_f32,
27788        body_yaw_rate: 0.0_f32,
27789        thrust: 0.0_f32,
27790        target_system: 0_u8,
27791        target_component: 0_u8,
27792        type_mask: AttitudeTargetTypemask::DEFAULT,
27793        thrust_body: [0.0_f32; 3usize],
27794    };
27795    #[cfg(feature = "arbitrary")]
27796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27797        use arbitrary::{Arbitrary, Unstructured};
27798        let mut buf = [0u8; 1024];
27799        rng.fill_bytes(&mut buf);
27800        let mut unstructured = Unstructured::new(&buf);
27801        Self::arbitrary(&mut unstructured).unwrap_or_default()
27802    }
27803}
27804impl Default for SET_ATTITUDE_TARGET_DATA {
27805    fn default() -> Self {
27806        Self::DEFAULT.clone()
27807    }
27808}
27809impl MessageData for SET_ATTITUDE_TARGET_DATA {
27810    type Message = MavMessage;
27811    const ID: u32 = 82u32;
27812    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27813    const EXTRA_CRC: u8 = 49u8;
27814    const ENCODED_LEN: usize = 51usize;
27815    fn deser(
27816        _version: MavlinkVersion,
27817        __input: &[u8],
27818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27819        let avail_len = __input.len();
27820        let mut payload_buf = [0; Self::ENCODED_LEN];
27821        let mut buf = if avail_len < Self::ENCODED_LEN {
27822            payload_buf[0..avail_len].copy_from_slice(__input);
27823            Bytes::new(&payload_buf)
27824        } else {
27825            Bytes::new(__input)
27826        };
27827        let mut __struct = Self::default();
27828        __struct.time_boot_ms = buf.get_u32_le();
27829        for v in &mut __struct.q {
27830            let val = buf.get_f32_le();
27831            *v = val;
27832        }
27833        __struct.body_roll_rate = buf.get_f32_le();
27834        __struct.body_pitch_rate = buf.get_f32_le();
27835        __struct.body_yaw_rate = buf.get_f32_le();
27836        __struct.thrust = buf.get_f32_le();
27837        __struct.target_system = buf.get_u8();
27838        __struct.target_component = buf.get_u8();
27839        let tmp = buf.get_u8();
27840        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27841            tmp & AttitudeTargetTypemask::all().bits(),
27842        )
27843        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27844            flag_type: "AttitudeTargetTypemask",
27845            value: tmp as u32,
27846        })?;
27847        for v in &mut __struct.thrust_body {
27848            let val = buf.get_f32_le();
27849            *v = val;
27850        }
27851        Ok(__struct)
27852    }
27853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27854        let mut __tmp = BytesMut::new(bytes);
27855        #[allow(clippy::absurd_extreme_comparisons)]
27856        #[allow(unused_comparisons)]
27857        if __tmp.remaining() < Self::ENCODED_LEN {
27858            panic!(
27859                "buffer is too small (need {} bytes, but got {})",
27860                Self::ENCODED_LEN,
27861                __tmp.remaining(),
27862            )
27863        }
27864        __tmp.put_u32_le(self.time_boot_ms);
27865        for val in &self.q {
27866            __tmp.put_f32_le(*val);
27867        }
27868        __tmp.put_f32_le(self.body_roll_rate);
27869        __tmp.put_f32_le(self.body_pitch_rate);
27870        __tmp.put_f32_le(self.body_yaw_rate);
27871        __tmp.put_f32_le(self.thrust);
27872        __tmp.put_u8(self.target_system);
27873        __tmp.put_u8(self.target_component);
27874        __tmp.put_u8(self.type_mask.bits());
27875        if matches!(version, MavlinkVersion::V2) {
27876            for val in &self.thrust_body {
27877                __tmp.put_f32_le(*val);
27878            }
27879            let len = __tmp.len();
27880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27881        } else {
27882            __tmp.len()
27883        }
27884    }
27885}
27886#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27887#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27888#[doc = ""]
27889#[doc = "ID: 48"]
27890#[derive(Debug, Clone, PartialEq)]
27891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27893#[cfg_attr(feature = "ts", derive(TS))]
27894#[cfg_attr(feature = "ts", ts(export))]
27895pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27896    #[doc = "Latitude (WGS84)"]
27897    pub latitude: i32,
27898    #[doc = "Longitude (WGS84)"]
27899    pub longitude: i32,
27900    #[doc = "Altitude (MSL). Positive for up."]
27901    pub altitude: i32,
27902    #[doc = "System ID"]
27903    pub target_system: u8,
27904    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27906    pub time_usec: u64,
27907}
27908impl SET_GPS_GLOBAL_ORIGIN_DATA {
27909    pub const ENCODED_LEN: usize = 21usize;
27910    pub const DEFAULT: Self = Self {
27911        latitude: 0_i32,
27912        longitude: 0_i32,
27913        altitude: 0_i32,
27914        target_system: 0_u8,
27915        time_usec: 0_u64,
27916    };
27917    #[cfg(feature = "arbitrary")]
27918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27919        use arbitrary::{Arbitrary, Unstructured};
27920        let mut buf = [0u8; 1024];
27921        rng.fill_bytes(&mut buf);
27922        let mut unstructured = Unstructured::new(&buf);
27923        Self::arbitrary(&mut unstructured).unwrap_or_default()
27924    }
27925}
27926impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27927    fn default() -> Self {
27928        Self::DEFAULT.clone()
27929    }
27930}
27931impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27932    type Message = MavMessage;
27933    const ID: u32 = 48u32;
27934    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27935    const EXTRA_CRC: u8 = 41u8;
27936    const ENCODED_LEN: usize = 21usize;
27937    fn deser(
27938        _version: MavlinkVersion,
27939        __input: &[u8],
27940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27941        let avail_len = __input.len();
27942        let mut payload_buf = [0; Self::ENCODED_LEN];
27943        let mut buf = if avail_len < Self::ENCODED_LEN {
27944            payload_buf[0..avail_len].copy_from_slice(__input);
27945            Bytes::new(&payload_buf)
27946        } else {
27947            Bytes::new(__input)
27948        };
27949        let mut __struct = Self::default();
27950        __struct.latitude = buf.get_i32_le();
27951        __struct.longitude = buf.get_i32_le();
27952        __struct.altitude = buf.get_i32_le();
27953        __struct.target_system = buf.get_u8();
27954        __struct.time_usec = buf.get_u64_le();
27955        Ok(__struct)
27956    }
27957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27958        let mut __tmp = BytesMut::new(bytes);
27959        #[allow(clippy::absurd_extreme_comparisons)]
27960        #[allow(unused_comparisons)]
27961        if __tmp.remaining() < Self::ENCODED_LEN {
27962            panic!(
27963                "buffer is too small (need {} bytes, but got {})",
27964                Self::ENCODED_LEN,
27965                __tmp.remaining(),
27966            )
27967        }
27968        __tmp.put_i32_le(self.latitude);
27969        __tmp.put_i32_le(self.longitude);
27970        __tmp.put_i32_le(self.altitude);
27971        __tmp.put_u8(self.target_system);
27972        if matches!(version, MavlinkVersion::V2) {
27973            __tmp.put_u64_le(self.time_usec);
27974            let len = __tmp.len();
27975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27976        } else {
27977            __tmp.len()
27978        }
27979    }
27980}
27981#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27982#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27983#[doc = ""]
27984#[doc = "ID: 243"]
27985#[derive(Debug, Clone, PartialEq)]
27986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27988#[cfg_attr(feature = "ts", derive(TS))]
27989#[cfg_attr(feature = "ts", ts(export))]
27990pub struct SET_HOME_POSITION_DATA {
27991    #[doc = "Latitude (WGS84)"]
27992    pub latitude: i32,
27993    #[doc = "Longitude (WGS84)"]
27994    pub longitude: i32,
27995    #[doc = "Altitude (MSL). Positive for up."]
27996    pub altitude: i32,
27997    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27998    pub x: f32,
27999    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28000    pub y: f32,
28001    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28002    pub z: f32,
28003    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28006    pub q: [f32; 4],
28007    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28008    pub approach_x: f32,
28009    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28010    pub approach_y: f32,
28011    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28012    pub approach_z: f32,
28013    #[doc = "System ID."]
28014    pub target_system: u8,
28015    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28017    pub time_usec: u64,
28018}
28019impl SET_HOME_POSITION_DATA {
28020    pub const ENCODED_LEN: usize = 61usize;
28021    pub const DEFAULT: Self = Self {
28022        latitude: 0_i32,
28023        longitude: 0_i32,
28024        altitude: 0_i32,
28025        x: 0.0_f32,
28026        y: 0.0_f32,
28027        z: 0.0_f32,
28028        q: [0.0_f32; 4usize],
28029        approach_x: 0.0_f32,
28030        approach_y: 0.0_f32,
28031        approach_z: 0.0_f32,
28032        target_system: 0_u8,
28033        time_usec: 0_u64,
28034    };
28035    #[cfg(feature = "arbitrary")]
28036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28037        use arbitrary::{Arbitrary, Unstructured};
28038        let mut buf = [0u8; 1024];
28039        rng.fill_bytes(&mut buf);
28040        let mut unstructured = Unstructured::new(&buf);
28041        Self::arbitrary(&mut unstructured).unwrap_or_default()
28042    }
28043}
28044impl Default for SET_HOME_POSITION_DATA {
28045    fn default() -> Self {
28046        Self::DEFAULT.clone()
28047    }
28048}
28049impl MessageData for SET_HOME_POSITION_DATA {
28050    type Message = MavMessage;
28051    const ID: u32 = 243u32;
28052    const NAME: &'static str = "SET_HOME_POSITION";
28053    const EXTRA_CRC: u8 = 85u8;
28054    const ENCODED_LEN: usize = 61usize;
28055    fn deser(
28056        _version: MavlinkVersion,
28057        __input: &[u8],
28058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28059        let avail_len = __input.len();
28060        let mut payload_buf = [0; Self::ENCODED_LEN];
28061        let mut buf = if avail_len < Self::ENCODED_LEN {
28062            payload_buf[0..avail_len].copy_from_slice(__input);
28063            Bytes::new(&payload_buf)
28064        } else {
28065            Bytes::new(__input)
28066        };
28067        let mut __struct = Self::default();
28068        __struct.latitude = buf.get_i32_le();
28069        __struct.longitude = buf.get_i32_le();
28070        __struct.altitude = buf.get_i32_le();
28071        __struct.x = buf.get_f32_le();
28072        __struct.y = buf.get_f32_le();
28073        __struct.z = buf.get_f32_le();
28074        for v in &mut __struct.q {
28075            let val = buf.get_f32_le();
28076            *v = val;
28077        }
28078        __struct.approach_x = buf.get_f32_le();
28079        __struct.approach_y = buf.get_f32_le();
28080        __struct.approach_z = buf.get_f32_le();
28081        __struct.target_system = buf.get_u8();
28082        __struct.time_usec = buf.get_u64_le();
28083        Ok(__struct)
28084    }
28085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28086        let mut __tmp = BytesMut::new(bytes);
28087        #[allow(clippy::absurd_extreme_comparisons)]
28088        #[allow(unused_comparisons)]
28089        if __tmp.remaining() < Self::ENCODED_LEN {
28090            panic!(
28091                "buffer is too small (need {} bytes, but got {})",
28092                Self::ENCODED_LEN,
28093                __tmp.remaining(),
28094            )
28095        }
28096        __tmp.put_i32_le(self.latitude);
28097        __tmp.put_i32_le(self.longitude);
28098        __tmp.put_i32_le(self.altitude);
28099        __tmp.put_f32_le(self.x);
28100        __tmp.put_f32_le(self.y);
28101        __tmp.put_f32_le(self.z);
28102        for val in &self.q {
28103            __tmp.put_f32_le(*val);
28104        }
28105        __tmp.put_f32_le(self.approach_x);
28106        __tmp.put_f32_le(self.approach_y);
28107        __tmp.put_f32_le(self.approach_z);
28108        __tmp.put_u8(self.target_system);
28109        if matches!(version, MavlinkVersion::V2) {
28110            __tmp.put_u64_le(self.time_usec);
28111            let len = __tmp.len();
28112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28113        } else {
28114            __tmp.len()
28115        }
28116    }
28117}
28118#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28119#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28120#[doc = ""]
28121#[doc = "ID: 11"]
28122#[derive(Debug, Clone, PartialEq)]
28123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28125#[cfg_attr(feature = "ts", derive(TS))]
28126#[cfg_attr(feature = "ts", ts(export))]
28127pub struct SET_MODE_DATA {
28128    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28129    pub custom_mode: u32,
28130    #[doc = "The system setting the mode"]
28131    pub target_system: u8,
28132    #[doc = "The new base mode."]
28133    pub base_mode: MavMode,
28134}
28135impl SET_MODE_DATA {
28136    pub const ENCODED_LEN: usize = 6usize;
28137    pub const DEFAULT: Self = Self {
28138        custom_mode: 0_u32,
28139        target_system: 0_u8,
28140        base_mode: MavMode::DEFAULT,
28141    };
28142    #[cfg(feature = "arbitrary")]
28143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28144        use arbitrary::{Arbitrary, Unstructured};
28145        let mut buf = [0u8; 1024];
28146        rng.fill_bytes(&mut buf);
28147        let mut unstructured = Unstructured::new(&buf);
28148        Self::arbitrary(&mut unstructured).unwrap_or_default()
28149    }
28150}
28151impl Default for SET_MODE_DATA {
28152    fn default() -> Self {
28153        Self::DEFAULT.clone()
28154    }
28155}
28156impl MessageData for SET_MODE_DATA {
28157    type Message = MavMessage;
28158    const ID: u32 = 11u32;
28159    const NAME: &'static str = "SET_MODE";
28160    const EXTRA_CRC: u8 = 89u8;
28161    const ENCODED_LEN: usize = 6usize;
28162    fn deser(
28163        _version: MavlinkVersion,
28164        __input: &[u8],
28165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28166        let avail_len = __input.len();
28167        let mut payload_buf = [0; Self::ENCODED_LEN];
28168        let mut buf = if avail_len < Self::ENCODED_LEN {
28169            payload_buf[0..avail_len].copy_from_slice(__input);
28170            Bytes::new(&payload_buf)
28171        } else {
28172            Bytes::new(__input)
28173        };
28174        let mut __struct = Self::default();
28175        __struct.custom_mode = buf.get_u32_le();
28176        __struct.target_system = buf.get_u8();
28177        let tmp = buf.get_u8();
28178        __struct.base_mode =
28179            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28180                enum_type: "MavMode",
28181                value: tmp as u32,
28182            })?;
28183        Ok(__struct)
28184    }
28185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28186        let mut __tmp = BytesMut::new(bytes);
28187        #[allow(clippy::absurd_extreme_comparisons)]
28188        #[allow(unused_comparisons)]
28189        if __tmp.remaining() < Self::ENCODED_LEN {
28190            panic!(
28191                "buffer is too small (need {} bytes, but got {})",
28192                Self::ENCODED_LEN,
28193                __tmp.remaining(),
28194            )
28195        }
28196        __tmp.put_u32_le(self.custom_mode);
28197        __tmp.put_u8(self.target_system);
28198        __tmp.put_u8(self.base_mode as u8);
28199        if matches!(version, MavlinkVersion::V2) {
28200            let len = __tmp.len();
28201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28202        } else {
28203            __tmp.len()
28204        }
28205    }
28206}
28207#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28208#[doc = ""]
28209#[doc = "ID: 86"]
28210#[derive(Debug, Clone, PartialEq)]
28211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28213#[cfg_attr(feature = "ts", derive(TS))]
28214#[cfg_attr(feature = "ts", ts(export))]
28215pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28216    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28217    pub time_boot_ms: u32,
28218    #[doc = "Latitude in WGS84 frame"]
28219    pub lat_int: i32,
28220    #[doc = "Longitude in WGS84 frame"]
28221    pub lon_int: i32,
28222    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28223    pub alt: f32,
28224    #[doc = "X velocity in NED frame"]
28225    pub vx: f32,
28226    #[doc = "Y velocity in NED frame"]
28227    pub vy: f32,
28228    #[doc = "Z velocity in NED frame"]
28229    pub vz: f32,
28230    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28231    pub afx: f32,
28232    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28233    pub afy: f32,
28234    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28235    pub afz: f32,
28236    #[doc = "yaw setpoint"]
28237    pub yaw: f32,
28238    #[doc = "yaw rate setpoint"]
28239    pub yaw_rate: f32,
28240    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28241    pub type_mask: PositionTargetTypemask,
28242    #[doc = "System ID"]
28243    pub target_system: u8,
28244    #[doc = "Component ID"]
28245    pub target_component: u8,
28246    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28247    pub coordinate_frame: MavFrame,
28248}
28249impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28250    pub const ENCODED_LEN: usize = 53usize;
28251    pub const DEFAULT: Self = Self {
28252        time_boot_ms: 0_u32,
28253        lat_int: 0_i32,
28254        lon_int: 0_i32,
28255        alt: 0.0_f32,
28256        vx: 0.0_f32,
28257        vy: 0.0_f32,
28258        vz: 0.0_f32,
28259        afx: 0.0_f32,
28260        afy: 0.0_f32,
28261        afz: 0.0_f32,
28262        yaw: 0.0_f32,
28263        yaw_rate: 0.0_f32,
28264        type_mask: PositionTargetTypemask::DEFAULT,
28265        target_system: 0_u8,
28266        target_component: 0_u8,
28267        coordinate_frame: MavFrame::DEFAULT,
28268    };
28269    #[cfg(feature = "arbitrary")]
28270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28271        use arbitrary::{Arbitrary, Unstructured};
28272        let mut buf = [0u8; 1024];
28273        rng.fill_bytes(&mut buf);
28274        let mut unstructured = Unstructured::new(&buf);
28275        Self::arbitrary(&mut unstructured).unwrap_or_default()
28276    }
28277}
28278impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28279    fn default() -> Self {
28280        Self::DEFAULT.clone()
28281    }
28282}
28283impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28284    type Message = MavMessage;
28285    const ID: u32 = 86u32;
28286    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28287    const EXTRA_CRC: u8 = 5u8;
28288    const ENCODED_LEN: usize = 53usize;
28289    fn deser(
28290        _version: MavlinkVersion,
28291        __input: &[u8],
28292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28293        let avail_len = __input.len();
28294        let mut payload_buf = [0; Self::ENCODED_LEN];
28295        let mut buf = if avail_len < Self::ENCODED_LEN {
28296            payload_buf[0..avail_len].copy_from_slice(__input);
28297            Bytes::new(&payload_buf)
28298        } else {
28299            Bytes::new(__input)
28300        };
28301        let mut __struct = Self::default();
28302        __struct.time_boot_ms = buf.get_u32_le();
28303        __struct.lat_int = buf.get_i32_le();
28304        __struct.lon_int = buf.get_i32_le();
28305        __struct.alt = buf.get_f32_le();
28306        __struct.vx = buf.get_f32_le();
28307        __struct.vy = buf.get_f32_le();
28308        __struct.vz = buf.get_f32_le();
28309        __struct.afx = buf.get_f32_le();
28310        __struct.afy = buf.get_f32_le();
28311        __struct.afz = buf.get_f32_le();
28312        __struct.yaw = buf.get_f32_le();
28313        __struct.yaw_rate = buf.get_f32_le();
28314        let tmp = buf.get_u16_le();
28315        __struct.type_mask = PositionTargetTypemask::from_bits(
28316            tmp & PositionTargetTypemask::all().bits(),
28317        )
28318        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28319            flag_type: "PositionTargetTypemask",
28320            value: tmp as u32,
28321        })?;
28322        __struct.target_system = buf.get_u8();
28323        __struct.target_component = buf.get_u8();
28324        let tmp = buf.get_u8();
28325        __struct.coordinate_frame =
28326            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28327                enum_type: "MavFrame",
28328                value: tmp as u32,
28329            })?;
28330        Ok(__struct)
28331    }
28332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28333        let mut __tmp = BytesMut::new(bytes);
28334        #[allow(clippy::absurd_extreme_comparisons)]
28335        #[allow(unused_comparisons)]
28336        if __tmp.remaining() < Self::ENCODED_LEN {
28337            panic!(
28338                "buffer is too small (need {} bytes, but got {})",
28339                Self::ENCODED_LEN,
28340                __tmp.remaining(),
28341            )
28342        }
28343        __tmp.put_u32_le(self.time_boot_ms);
28344        __tmp.put_i32_le(self.lat_int);
28345        __tmp.put_i32_le(self.lon_int);
28346        __tmp.put_f32_le(self.alt);
28347        __tmp.put_f32_le(self.vx);
28348        __tmp.put_f32_le(self.vy);
28349        __tmp.put_f32_le(self.vz);
28350        __tmp.put_f32_le(self.afx);
28351        __tmp.put_f32_le(self.afy);
28352        __tmp.put_f32_le(self.afz);
28353        __tmp.put_f32_le(self.yaw);
28354        __tmp.put_f32_le(self.yaw_rate);
28355        __tmp.put_u16_le(self.type_mask.bits());
28356        __tmp.put_u8(self.target_system);
28357        __tmp.put_u8(self.target_component);
28358        __tmp.put_u8(self.coordinate_frame as u8);
28359        if matches!(version, MavlinkVersion::V2) {
28360            let len = __tmp.len();
28361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28362        } else {
28363            __tmp.len()
28364        }
28365    }
28366}
28367#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28368#[doc = ""]
28369#[doc = "ID: 84"]
28370#[derive(Debug, Clone, PartialEq)]
28371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28373#[cfg_attr(feature = "ts", derive(TS))]
28374#[cfg_attr(feature = "ts", ts(export))]
28375pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28376    #[doc = "Timestamp (time since system boot)."]
28377    pub time_boot_ms: u32,
28378    #[doc = "X Position in NED frame"]
28379    pub x: f32,
28380    #[doc = "Y Position in NED frame"]
28381    pub y: f32,
28382    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28383    pub z: f32,
28384    #[doc = "X velocity in NED frame"]
28385    pub vx: f32,
28386    #[doc = "Y velocity in NED frame"]
28387    pub vy: f32,
28388    #[doc = "Z velocity in NED frame"]
28389    pub vz: f32,
28390    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28391    pub afx: f32,
28392    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28393    pub afy: f32,
28394    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28395    pub afz: f32,
28396    #[doc = "yaw setpoint"]
28397    pub yaw: f32,
28398    #[doc = "yaw rate setpoint"]
28399    pub yaw_rate: f32,
28400    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28401    pub type_mask: PositionTargetTypemask,
28402    #[doc = "System ID"]
28403    pub target_system: u8,
28404    #[doc = "Component ID"]
28405    pub target_component: u8,
28406    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28407    pub coordinate_frame: MavFrame,
28408}
28409impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28410    pub const ENCODED_LEN: usize = 53usize;
28411    pub const DEFAULT: Self = Self {
28412        time_boot_ms: 0_u32,
28413        x: 0.0_f32,
28414        y: 0.0_f32,
28415        z: 0.0_f32,
28416        vx: 0.0_f32,
28417        vy: 0.0_f32,
28418        vz: 0.0_f32,
28419        afx: 0.0_f32,
28420        afy: 0.0_f32,
28421        afz: 0.0_f32,
28422        yaw: 0.0_f32,
28423        yaw_rate: 0.0_f32,
28424        type_mask: PositionTargetTypemask::DEFAULT,
28425        target_system: 0_u8,
28426        target_component: 0_u8,
28427        coordinate_frame: MavFrame::DEFAULT,
28428    };
28429    #[cfg(feature = "arbitrary")]
28430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28431        use arbitrary::{Arbitrary, Unstructured};
28432        let mut buf = [0u8; 1024];
28433        rng.fill_bytes(&mut buf);
28434        let mut unstructured = Unstructured::new(&buf);
28435        Self::arbitrary(&mut unstructured).unwrap_or_default()
28436    }
28437}
28438impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28439    fn default() -> Self {
28440        Self::DEFAULT.clone()
28441    }
28442}
28443impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28444    type Message = MavMessage;
28445    const ID: u32 = 84u32;
28446    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28447    const EXTRA_CRC: u8 = 143u8;
28448    const ENCODED_LEN: usize = 53usize;
28449    fn deser(
28450        _version: MavlinkVersion,
28451        __input: &[u8],
28452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28453        let avail_len = __input.len();
28454        let mut payload_buf = [0; Self::ENCODED_LEN];
28455        let mut buf = if avail_len < Self::ENCODED_LEN {
28456            payload_buf[0..avail_len].copy_from_slice(__input);
28457            Bytes::new(&payload_buf)
28458        } else {
28459            Bytes::new(__input)
28460        };
28461        let mut __struct = Self::default();
28462        __struct.time_boot_ms = buf.get_u32_le();
28463        __struct.x = buf.get_f32_le();
28464        __struct.y = buf.get_f32_le();
28465        __struct.z = buf.get_f32_le();
28466        __struct.vx = buf.get_f32_le();
28467        __struct.vy = buf.get_f32_le();
28468        __struct.vz = buf.get_f32_le();
28469        __struct.afx = buf.get_f32_le();
28470        __struct.afy = buf.get_f32_le();
28471        __struct.afz = buf.get_f32_le();
28472        __struct.yaw = buf.get_f32_le();
28473        __struct.yaw_rate = buf.get_f32_le();
28474        let tmp = buf.get_u16_le();
28475        __struct.type_mask = PositionTargetTypemask::from_bits(
28476            tmp & PositionTargetTypemask::all().bits(),
28477        )
28478        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28479            flag_type: "PositionTargetTypemask",
28480            value: tmp as u32,
28481        })?;
28482        __struct.target_system = buf.get_u8();
28483        __struct.target_component = buf.get_u8();
28484        let tmp = buf.get_u8();
28485        __struct.coordinate_frame =
28486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28487                enum_type: "MavFrame",
28488                value: tmp as u32,
28489            })?;
28490        Ok(__struct)
28491    }
28492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28493        let mut __tmp = BytesMut::new(bytes);
28494        #[allow(clippy::absurd_extreme_comparisons)]
28495        #[allow(unused_comparisons)]
28496        if __tmp.remaining() < Self::ENCODED_LEN {
28497            panic!(
28498                "buffer is too small (need {} bytes, but got {})",
28499                Self::ENCODED_LEN,
28500                __tmp.remaining(),
28501            )
28502        }
28503        __tmp.put_u32_le(self.time_boot_ms);
28504        __tmp.put_f32_le(self.x);
28505        __tmp.put_f32_le(self.y);
28506        __tmp.put_f32_le(self.z);
28507        __tmp.put_f32_le(self.vx);
28508        __tmp.put_f32_le(self.vy);
28509        __tmp.put_f32_le(self.vz);
28510        __tmp.put_f32_le(self.afx);
28511        __tmp.put_f32_le(self.afy);
28512        __tmp.put_f32_le(self.afz);
28513        __tmp.put_f32_le(self.yaw);
28514        __tmp.put_f32_le(self.yaw_rate);
28515        __tmp.put_u16_le(self.type_mask.bits());
28516        __tmp.put_u8(self.target_system);
28517        __tmp.put_u8(self.target_component);
28518        __tmp.put_u8(self.coordinate_frame as u8);
28519        if matches!(version, MavlinkVersion::V2) {
28520            let len = __tmp.len();
28521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28522        } else {
28523            __tmp.len()
28524        }
28525    }
28526}
28527#[doc = "Status of simulation environment, if used."]
28528#[doc = ""]
28529#[doc = "ID: 108"]
28530#[derive(Debug, Clone, PartialEq)]
28531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28533#[cfg_attr(feature = "ts", derive(TS))]
28534#[cfg_attr(feature = "ts", ts(export))]
28535pub struct SIM_STATE_DATA {
28536    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28537    pub q1: f32,
28538    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28539    pub q2: f32,
28540    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28541    pub q3: f32,
28542    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28543    pub q4: f32,
28544    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28545    pub roll: f32,
28546    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28547    pub pitch: f32,
28548    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28549    pub yaw: f32,
28550    #[doc = "X acceleration"]
28551    pub xacc: f32,
28552    #[doc = "Y acceleration"]
28553    pub yacc: f32,
28554    #[doc = "Z acceleration"]
28555    pub zacc: f32,
28556    #[doc = "Angular speed around X axis"]
28557    pub xgyro: f32,
28558    #[doc = "Angular speed around Y axis"]
28559    pub ygyro: f32,
28560    #[doc = "Angular speed around Z axis"]
28561    pub zgyro: f32,
28562    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28563    pub lat: f32,
28564    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28565    pub lon: f32,
28566    #[doc = "Altitude"]
28567    pub alt: f32,
28568    #[doc = "Horizontal position standard deviation"]
28569    pub std_dev_horz: f32,
28570    #[doc = "Vertical position standard deviation"]
28571    pub std_dev_vert: f32,
28572    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28573    pub vn: f32,
28574    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28575    pub ve: f32,
28576    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28577    pub vd: f32,
28578    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28579    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28580    pub lat_int: i32,
28581    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28582    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28583    pub lon_int: i32,
28584}
28585impl SIM_STATE_DATA {
28586    pub const ENCODED_LEN: usize = 92usize;
28587    pub const DEFAULT: Self = Self {
28588        q1: 0.0_f32,
28589        q2: 0.0_f32,
28590        q3: 0.0_f32,
28591        q4: 0.0_f32,
28592        roll: 0.0_f32,
28593        pitch: 0.0_f32,
28594        yaw: 0.0_f32,
28595        xacc: 0.0_f32,
28596        yacc: 0.0_f32,
28597        zacc: 0.0_f32,
28598        xgyro: 0.0_f32,
28599        ygyro: 0.0_f32,
28600        zgyro: 0.0_f32,
28601        lat: 0.0_f32,
28602        lon: 0.0_f32,
28603        alt: 0.0_f32,
28604        std_dev_horz: 0.0_f32,
28605        std_dev_vert: 0.0_f32,
28606        vn: 0.0_f32,
28607        ve: 0.0_f32,
28608        vd: 0.0_f32,
28609        lat_int: 0_i32,
28610        lon_int: 0_i32,
28611    };
28612    #[cfg(feature = "arbitrary")]
28613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28614        use arbitrary::{Arbitrary, Unstructured};
28615        let mut buf = [0u8; 1024];
28616        rng.fill_bytes(&mut buf);
28617        let mut unstructured = Unstructured::new(&buf);
28618        Self::arbitrary(&mut unstructured).unwrap_or_default()
28619    }
28620}
28621impl Default for SIM_STATE_DATA {
28622    fn default() -> Self {
28623        Self::DEFAULT.clone()
28624    }
28625}
28626impl MessageData for SIM_STATE_DATA {
28627    type Message = MavMessage;
28628    const ID: u32 = 108u32;
28629    const NAME: &'static str = "SIM_STATE";
28630    const EXTRA_CRC: u8 = 32u8;
28631    const ENCODED_LEN: usize = 92usize;
28632    fn deser(
28633        _version: MavlinkVersion,
28634        __input: &[u8],
28635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28636        let avail_len = __input.len();
28637        let mut payload_buf = [0; Self::ENCODED_LEN];
28638        let mut buf = if avail_len < Self::ENCODED_LEN {
28639            payload_buf[0..avail_len].copy_from_slice(__input);
28640            Bytes::new(&payload_buf)
28641        } else {
28642            Bytes::new(__input)
28643        };
28644        let mut __struct = Self::default();
28645        __struct.q1 = buf.get_f32_le();
28646        __struct.q2 = buf.get_f32_le();
28647        __struct.q3 = buf.get_f32_le();
28648        __struct.q4 = buf.get_f32_le();
28649        __struct.roll = buf.get_f32_le();
28650        __struct.pitch = buf.get_f32_le();
28651        __struct.yaw = buf.get_f32_le();
28652        __struct.xacc = buf.get_f32_le();
28653        __struct.yacc = buf.get_f32_le();
28654        __struct.zacc = buf.get_f32_le();
28655        __struct.xgyro = buf.get_f32_le();
28656        __struct.ygyro = buf.get_f32_le();
28657        __struct.zgyro = buf.get_f32_le();
28658        __struct.lat = buf.get_f32_le();
28659        __struct.lon = buf.get_f32_le();
28660        __struct.alt = buf.get_f32_le();
28661        __struct.std_dev_horz = buf.get_f32_le();
28662        __struct.std_dev_vert = buf.get_f32_le();
28663        __struct.vn = buf.get_f32_le();
28664        __struct.ve = buf.get_f32_le();
28665        __struct.vd = buf.get_f32_le();
28666        __struct.lat_int = buf.get_i32_le();
28667        __struct.lon_int = buf.get_i32_le();
28668        Ok(__struct)
28669    }
28670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28671        let mut __tmp = BytesMut::new(bytes);
28672        #[allow(clippy::absurd_extreme_comparisons)]
28673        #[allow(unused_comparisons)]
28674        if __tmp.remaining() < Self::ENCODED_LEN {
28675            panic!(
28676                "buffer is too small (need {} bytes, but got {})",
28677                Self::ENCODED_LEN,
28678                __tmp.remaining(),
28679            )
28680        }
28681        __tmp.put_f32_le(self.q1);
28682        __tmp.put_f32_le(self.q2);
28683        __tmp.put_f32_le(self.q3);
28684        __tmp.put_f32_le(self.q4);
28685        __tmp.put_f32_le(self.roll);
28686        __tmp.put_f32_le(self.pitch);
28687        __tmp.put_f32_le(self.yaw);
28688        __tmp.put_f32_le(self.xacc);
28689        __tmp.put_f32_le(self.yacc);
28690        __tmp.put_f32_le(self.zacc);
28691        __tmp.put_f32_le(self.xgyro);
28692        __tmp.put_f32_le(self.ygyro);
28693        __tmp.put_f32_le(self.zgyro);
28694        __tmp.put_f32_le(self.lat);
28695        __tmp.put_f32_le(self.lon);
28696        __tmp.put_f32_le(self.alt);
28697        __tmp.put_f32_le(self.std_dev_horz);
28698        __tmp.put_f32_le(self.std_dev_vert);
28699        __tmp.put_f32_le(self.vn);
28700        __tmp.put_f32_le(self.ve);
28701        __tmp.put_f32_le(self.vd);
28702        if matches!(version, MavlinkVersion::V2) {
28703            __tmp.put_i32_le(self.lat_int);
28704            __tmp.put_i32_le(self.lon_int);
28705            let len = __tmp.len();
28706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28707        } else {
28708            __tmp.len()
28709        }
28710    }
28711}
28712#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28713#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28714#[doc = ""]
28715#[doc = "ID: 370"]
28716#[derive(Debug, Clone, PartialEq)]
28717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28719#[cfg_attr(feature = "ts", derive(TS))]
28720#[cfg_attr(feature = "ts", ts(export))]
28721pub struct SMART_BATTERY_INFO_DATA {
28722    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28723    pub capacity_full_specification: i32,
28724    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28725    pub capacity_full: i32,
28726    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28727    pub cycle_count: u16,
28728    #[doc = "Battery weight. 0: field not provided."]
28729    pub weight: u16,
28730    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28731    pub discharge_minimum_voltage: u16,
28732    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28733    pub charging_minimum_voltage: u16,
28734    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28735    pub resting_minimum_voltage: u16,
28736    #[doc = "Battery ID"]
28737    pub id: u8,
28738    #[doc = "Function of the battery"]
28739    pub battery_function: MavBatteryFunction,
28740    #[doc = "Type (chemistry) of the battery"]
28741    pub mavtype: MavBatteryType,
28742    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28744    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28745    pub serial_number: [u8; 16],
28746    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28749    pub device_name: [u8; 50],
28750    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28752    pub charging_maximum_voltage: u16,
28753    #[doc = "Number of battery cells in series. 0: field not provided."]
28754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28755    pub cells_in_series: u8,
28756    #[doc = "Maximum pack discharge current. 0: field not provided."]
28757    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28758    pub discharge_maximum_current: u32,
28759    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28761    pub discharge_maximum_burst_current: u32,
28762    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28763    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28765    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28766    pub manufacture_date: [u8; 11],
28767}
28768impl SMART_BATTERY_INFO_DATA {
28769    pub const ENCODED_LEN: usize = 109usize;
28770    pub const DEFAULT: Self = Self {
28771        capacity_full_specification: 0_i32,
28772        capacity_full: 0_i32,
28773        cycle_count: 0_u16,
28774        weight: 0_u16,
28775        discharge_minimum_voltage: 0_u16,
28776        charging_minimum_voltage: 0_u16,
28777        resting_minimum_voltage: 0_u16,
28778        id: 0_u8,
28779        battery_function: MavBatteryFunction::DEFAULT,
28780        mavtype: MavBatteryType::DEFAULT,
28781        serial_number: [0_u8; 16usize],
28782        device_name: [0_u8; 50usize],
28783        charging_maximum_voltage: 0_u16,
28784        cells_in_series: 0_u8,
28785        discharge_maximum_current: 0_u32,
28786        discharge_maximum_burst_current: 0_u32,
28787        manufacture_date: [0_u8; 11usize],
28788    };
28789    #[cfg(feature = "arbitrary")]
28790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28791        use arbitrary::{Arbitrary, Unstructured};
28792        let mut buf = [0u8; 1024];
28793        rng.fill_bytes(&mut buf);
28794        let mut unstructured = Unstructured::new(&buf);
28795        Self::arbitrary(&mut unstructured).unwrap_or_default()
28796    }
28797}
28798impl Default for SMART_BATTERY_INFO_DATA {
28799    fn default() -> Self {
28800        Self::DEFAULT.clone()
28801    }
28802}
28803impl MessageData for SMART_BATTERY_INFO_DATA {
28804    type Message = MavMessage;
28805    const ID: u32 = 370u32;
28806    const NAME: &'static str = "SMART_BATTERY_INFO";
28807    const EXTRA_CRC: u8 = 75u8;
28808    const ENCODED_LEN: usize = 109usize;
28809    fn deser(
28810        _version: MavlinkVersion,
28811        __input: &[u8],
28812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28813        let avail_len = __input.len();
28814        let mut payload_buf = [0; Self::ENCODED_LEN];
28815        let mut buf = if avail_len < Self::ENCODED_LEN {
28816            payload_buf[0..avail_len].copy_from_slice(__input);
28817            Bytes::new(&payload_buf)
28818        } else {
28819            Bytes::new(__input)
28820        };
28821        let mut __struct = Self::default();
28822        __struct.capacity_full_specification = buf.get_i32_le();
28823        __struct.capacity_full = buf.get_i32_le();
28824        __struct.cycle_count = buf.get_u16_le();
28825        __struct.weight = buf.get_u16_le();
28826        __struct.discharge_minimum_voltage = buf.get_u16_le();
28827        __struct.charging_minimum_voltage = buf.get_u16_le();
28828        __struct.resting_minimum_voltage = buf.get_u16_le();
28829        __struct.id = buf.get_u8();
28830        let tmp = buf.get_u8();
28831        __struct.battery_function =
28832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28833                enum_type: "MavBatteryFunction",
28834                value: tmp as u32,
28835            })?;
28836        let tmp = buf.get_u8();
28837        __struct.mavtype =
28838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28839                enum_type: "MavBatteryType",
28840                value: tmp as u32,
28841            })?;
28842        for v in &mut __struct.serial_number {
28843            let val = buf.get_u8();
28844            *v = val;
28845        }
28846        for v in &mut __struct.device_name {
28847            let val = buf.get_u8();
28848            *v = val;
28849        }
28850        __struct.charging_maximum_voltage = buf.get_u16_le();
28851        __struct.cells_in_series = buf.get_u8();
28852        __struct.discharge_maximum_current = buf.get_u32_le();
28853        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28854        for v in &mut __struct.manufacture_date {
28855            let val = buf.get_u8();
28856            *v = val;
28857        }
28858        Ok(__struct)
28859    }
28860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28861        let mut __tmp = BytesMut::new(bytes);
28862        #[allow(clippy::absurd_extreme_comparisons)]
28863        #[allow(unused_comparisons)]
28864        if __tmp.remaining() < Self::ENCODED_LEN {
28865            panic!(
28866                "buffer is too small (need {} bytes, but got {})",
28867                Self::ENCODED_LEN,
28868                __tmp.remaining(),
28869            )
28870        }
28871        __tmp.put_i32_le(self.capacity_full_specification);
28872        __tmp.put_i32_le(self.capacity_full);
28873        __tmp.put_u16_le(self.cycle_count);
28874        __tmp.put_u16_le(self.weight);
28875        __tmp.put_u16_le(self.discharge_minimum_voltage);
28876        __tmp.put_u16_le(self.charging_minimum_voltage);
28877        __tmp.put_u16_le(self.resting_minimum_voltage);
28878        __tmp.put_u8(self.id);
28879        __tmp.put_u8(self.battery_function as u8);
28880        __tmp.put_u8(self.mavtype as u8);
28881        for val in &self.serial_number {
28882            __tmp.put_u8(*val);
28883        }
28884        for val in &self.device_name {
28885            __tmp.put_u8(*val);
28886        }
28887        if matches!(version, MavlinkVersion::V2) {
28888            __tmp.put_u16_le(self.charging_maximum_voltage);
28889            __tmp.put_u8(self.cells_in_series);
28890            __tmp.put_u32_le(self.discharge_maximum_current);
28891            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28892            for val in &self.manufacture_date {
28893                __tmp.put_u8(*val);
28894            }
28895            let len = __tmp.len();
28896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28897        } else {
28898            __tmp.len()
28899        }
28900    }
28901}
28902#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28903#[doc = ""]
28904#[doc = "ID: 253"]
28905#[derive(Debug, Clone, PartialEq)]
28906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28908#[cfg_attr(feature = "ts", derive(TS))]
28909#[cfg_attr(feature = "ts", ts(export))]
28910pub struct STATUSTEXT_DATA {
28911    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28912    pub severity: MavSeverity,
28913    #[doc = "Status text message, without null termination character"]
28914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28915    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28916    pub text: [u8; 50],
28917    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28919    pub id: u16,
28920    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28922    pub chunk_seq: u8,
28923}
28924impl STATUSTEXT_DATA {
28925    pub const ENCODED_LEN: usize = 54usize;
28926    pub const DEFAULT: Self = Self {
28927        severity: MavSeverity::DEFAULT,
28928        text: [0_u8; 50usize],
28929        id: 0_u16,
28930        chunk_seq: 0_u8,
28931    };
28932    #[cfg(feature = "arbitrary")]
28933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28934        use arbitrary::{Arbitrary, Unstructured};
28935        let mut buf = [0u8; 1024];
28936        rng.fill_bytes(&mut buf);
28937        let mut unstructured = Unstructured::new(&buf);
28938        Self::arbitrary(&mut unstructured).unwrap_or_default()
28939    }
28940}
28941impl Default for STATUSTEXT_DATA {
28942    fn default() -> Self {
28943        Self::DEFAULT.clone()
28944    }
28945}
28946impl MessageData for STATUSTEXT_DATA {
28947    type Message = MavMessage;
28948    const ID: u32 = 253u32;
28949    const NAME: &'static str = "STATUSTEXT";
28950    const EXTRA_CRC: u8 = 83u8;
28951    const ENCODED_LEN: usize = 54usize;
28952    fn deser(
28953        _version: MavlinkVersion,
28954        __input: &[u8],
28955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28956        let avail_len = __input.len();
28957        let mut payload_buf = [0; Self::ENCODED_LEN];
28958        let mut buf = if avail_len < Self::ENCODED_LEN {
28959            payload_buf[0..avail_len].copy_from_slice(__input);
28960            Bytes::new(&payload_buf)
28961        } else {
28962            Bytes::new(__input)
28963        };
28964        let mut __struct = Self::default();
28965        let tmp = buf.get_u8();
28966        __struct.severity =
28967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28968                enum_type: "MavSeverity",
28969                value: tmp as u32,
28970            })?;
28971        for v in &mut __struct.text {
28972            let val = buf.get_u8();
28973            *v = val;
28974        }
28975        __struct.id = buf.get_u16_le();
28976        __struct.chunk_seq = buf.get_u8();
28977        Ok(__struct)
28978    }
28979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28980        let mut __tmp = BytesMut::new(bytes);
28981        #[allow(clippy::absurd_extreme_comparisons)]
28982        #[allow(unused_comparisons)]
28983        if __tmp.remaining() < Self::ENCODED_LEN {
28984            panic!(
28985                "buffer is too small (need {} bytes, but got {})",
28986                Self::ENCODED_LEN,
28987                __tmp.remaining(),
28988            )
28989        }
28990        __tmp.put_u8(self.severity as u8);
28991        for val in &self.text {
28992            __tmp.put_u8(*val);
28993        }
28994        if matches!(version, MavlinkVersion::V2) {
28995            __tmp.put_u16_le(self.id);
28996            __tmp.put_u8(self.chunk_seq);
28997            let len = __tmp.len();
28998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28999        } else {
29000            __tmp.len()
29001        }
29002    }
29003}
29004#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29005#[doc = ""]
29006#[doc = "ID: 261"]
29007#[derive(Debug, Clone, PartialEq)]
29008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29010#[cfg_attr(feature = "ts", derive(TS))]
29011#[cfg_attr(feature = "ts", ts(export))]
29012pub struct STORAGE_INFORMATION_DATA {
29013    #[doc = "Timestamp (time since system boot)."]
29014    pub time_boot_ms: u32,
29015    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29016    pub total_capacity: f32,
29017    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29018    pub used_capacity: f32,
29019    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29020    pub available_capacity: f32,
29021    #[doc = "Read speed."]
29022    pub read_speed: f32,
29023    #[doc = "Write speed."]
29024    pub write_speed: f32,
29025    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29026    pub storage_id: u8,
29027    #[doc = "Number of storage devices"]
29028    pub storage_count: u8,
29029    #[doc = "Status of storage"]
29030    pub status: StorageStatus,
29031    #[doc = "Type of storage"]
29032    #[cfg_attr(feature = "serde", serde(default))]
29033    pub mavtype: StorageType,
29034    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29036    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29037    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29038    pub name: [u8; 32],
29039    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29040    #[cfg_attr(feature = "serde", serde(default))]
29041    pub storage_usage: StorageUsageFlag,
29042}
29043impl STORAGE_INFORMATION_DATA {
29044    pub const ENCODED_LEN: usize = 61usize;
29045    pub const DEFAULT: Self = Self {
29046        time_boot_ms: 0_u32,
29047        total_capacity: 0.0_f32,
29048        used_capacity: 0.0_f32,
29049        available_capacity: 0.0_f32,
29050        read_speed: 0.0_f32,
29051        write_speed: 0.0_f32,
29052        storage_id: 0_u8,
29053        storage_count: 0_u8,
29054        status: StorageStatus::DEFAULT,
29055        mavtype: StorageType::DEFAULT,
29056        name: [0_u8; 32usize],
29057        storage_usage: StorageUsageFlag::DEFAULT,
29058    };
29059    #[cfg(feature = "arbitrary")]
29060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29061        use arbitrary::{Arbitrary, Unstructured};
29062        let mut buf = [0u8; 1024];
29063        rng.fill_bytes(&mut buf);
29064        let mut unstructured = Unstructured::new(&buf);
29065        Self::arbitrary(&mut unstructured).unwrap_or_default()
29066    }
29067}
29068impl Default for STORAGE_INFORMATION_DATA {
29069    fn default() -> Self {
29070        Self::DEFAULT.clone()
29071    }
29072}
29073impl MessageData for STORAGE_INFORMATION_DATA {
29074    type Message = MavMessage;
29075    const ID: u32 = 261u32;
29076    const NAME: &'static str = "STORAGE_INFORMATION";
29077    const EXTRA_CRC: u8 = 179u8;
29078    const ENCODED_LEN: usize = 61usize;
29079    fn deser(
29080        _version: MavlinkVersion,
29081        __input: &[u8],
29082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29083        let avail_len = __input.len();
29084        let mut payload_buf = [0; Self::ENCODED_LEN];
29085        let mut buf = if avail_len < Self::ENCODED_LEN {
29086            payload_buf[0..avail_len].copy_from_slice(__input);
29087            Bytes::new(&payload_buf)
29088        } else {
29089            Bytes::new(__input)
29090        };
29091        let mut __struct = Self::default();
29092        __struct.time_boot_ms = buf.get_u32_le();
29093        __struct.total_capacity = buf.get_f32_le();
29094        __struct.used_capacity = buf.get_f32_le();
29095        __struct.available_capacity = buf.get_f32_le();
29096        __struct.read_speed = buf.get_f32_le();
29097        __struct.write_speed = buf.get_f32_le();
29098        __struct.storage_id = buf.get_u8();
29099        __struct.storage_count = buf.get_u8();
29100        let tmp = buf.get_u8();
29101        __struct.status =
29102            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29103                enum_type: "StorageStatus",
29104                value: tmp as u32,
29105            })?;
29106        let tmp = buf.get_u8();
29107        __struct.mavtype =
29108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29109                enum_type: "StorageType",
29110                value: tmp as u32,
29111            })?;
29112        for v in &mut __struct.name {
29113            let val = buf.get_u8();
29114            *v = val;
29115        }
29116        let tmp = buf.get_u8();
29117        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29118            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29119                flag_type: "StorageUsageFlag",
29120                value: tmp as u32,
29121            })?;
29122        Ok(__struct)
29123    }
29124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29125        let mut __tmp = BytesMut::new(bytes);
29126        #[allow(clippy::absurd_extreme_comparisons)]
29127        #[allow(unused_comparisons)]
29128        if __tmp.remaining() < Self::ENCODED_LEN {
29129            panic!(
29130                "buffer is too small (need {} bytes, but got {})",
29131                Self::ENCODED_LEN,
29132                __tmp.remaining(),
29133            )
29134        }
29135        __tmp.put_u32_le(self.time_boot_ms);
29136        __tmp.put_f32_le(self.total_capacity);
29137        __tmp.put_f32_le(self.used_capacity);
29138        __tmp.put_f32_le(self.available_capacity);
29139        __tmp.put_f32_le(self.read_speed);
29140        __tmp.put_f32_le(self.write_speed);
29141        __tmp.put_u8(self.storage_id);
29142        __tmp.put_u8(self.storage_count);
29143        __tmp.put_u8(self.status as u8);
29144        if matches!(version, MavlinkVersion::V2) {
29145            __tmp.put_u8(self.mavtype as u8);
29146            for val in &self.name {
29147                __tmp.put_u8(*val);
29148            }
29149            __tmp.put_u8(self.storage_usage.bits());
29150            let len = __tmp.len();
29151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29152        } else {
29153            __tmp.len()
29154        }
29155    }
29156}
29157#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29158#[doc = ""]
29159#[doc = "ID: 401"]
29160#[derive(Debug, Clone, PartialEq)]
29161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29163#[cfg_attr(feature = "ts", derive(TS))]
29164#[cfg_attr(feature = "ts", ts(export))]
29165pub struct SUPPORTED_TUNES_DATA {
29166    #[doc = "Bitfield of supported tune formats."]
29167    pub format: TuneFormat,
29168    #[doc = "System ID"]
29169    pub target_system: u8,
29170    #[doc = "Component ID"]
29171    pub target_component: u8,
29172}
29173impl SUPPORTED_TUNES_DATA {
29174    pub const ENCODED_LEN: usize = 6usize;
29175    pub const DEFAULT: Self = Self {
29176        format: TuneFormat::DEFAULT,
29177        target_system: 0_u8,
29178        target_component: 0_u8,
29179    };
29180    #[cfg(feature = "arbitrary")]
29181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29182        use arbitrary::{Arbitrary, Unstructured};
29183        let mut buf = [0u8; 1024];
29184        rng.fill_bytes(&mut buf);
29185        let mut unstructured = Unstructured::new(&buf);
29186        Self::arbitrary(&mut unstructured).unwrap_or_default()
29187    }
29188}
29189impl Default for SUPPORTED_TUNES_DATA {
29190    fn default() -> Self {
29191        Self::DEFAULT.clone()
29192    }
29193}
29194impl MessageData for SUPPORTED_TUNES_DATA {
29195    type Message = MavMessage;
29196    const ID: u32 = 401u32;
29197    const NAME: &'static str = "SUPPORTED_TUNES";
29198    const EXTRA_CRC: u8 = 183u8;
29199    const ENCODED_LEN: usize = 6usize;
29200    fn deser(
29201        _version: MavlinkVersion,
29202        __input: &[u8],
29203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29204        let avail_len = __input.len();
29205        let mut payload_buf = [0; Self::ENCODED_LEN];
29206        let mut buf = if avail_len < Self::ENCODED_LEN {
29207            payload_buf[0..avail_len].copy_from_slice(__input);
29208            Bytes::new(&payload_buf)
29209        } else {
29210            Bytes::new(__input)
29211        };
29212        let mut __struct = Self::default();
29213        let tmp = buf.get_u32_le();
29214        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29215            ::mavlink_core::error::ParserError::InvalidEnum {
29216                enum_type: "TuneFormat",
29217                value: tmp as u32,
29218            },
29219        )?;
29220        __struct.target_system = buf.get_u8();
29221        __struct.target_component = buf.get_u8();
29222        Ok(__struct)
29223    }
29224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29225        let mut __tmp = BytesMut::new(bytes);
29226        #[allow(clippy::absurd_extreme_comparisons)]
29227        #[allow(unused_comparisons)]
29228        if __tmp.remaining() < Self::ENCODED_LEN {
29229            panic!(
29230                "buffer is too small (need {} bytes, but got {})",
29231                Self::ENCODED_LEN,
29232                __tmp.remaining(),
29233            )
29234        }
29235        __tmp.put_u32_le(self.format as u32);
29236        __tmp.put_u8(self.target_system);
29237        __tmp.put_u8(self.target_component);
29238        if matches!(version, MavlinkVersion::V2) {
29239            let len = __tmp.len();
29240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29241        } else {
29242            __tmp.len()
29243        }
29244    }
29245}
29246#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29247#[doc = ""]
29248#[doc = "ID: 2"]
29249#[derive(Debug, Clone, PartialEq)]
29250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29252#[cfg_attr(feature = "ts", derive(TS))]
29253#[cfg_attr(feature = "ts", ts(export))]
29254pub struct SYSTEM_TIME_DATA {
29255    #[doc = "Timestamp (UNIX epoch time)."]
29256    pub time_unix_usec: u64,
29257    #[doc = "Timestamp (time since system boot)."]
29258    pub time_boot_ms: u32,
29259}
29260impl SYSTEM_TIME_DATA {
29261    pub const ENCODED_LEN: usize = 12usize;
29262    pub const DEFAULT: Self = Self {
29263        time_unix_usec: 0_u64,
29264        time_boot_ms: 0_u32,
29265    };
29266    #[cfg(feature = "arbitrary")]
29267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29268        use arbitrary::{Arbitrary, Unstructured};
29269        let mut buf = [0u8; 1024];
29270        rng.fill_bytes(&mut buf);
29271        let mut unstructured = Unstructured::new(&buf);
29272        Self::arbitrary(&mut unstructured).unwrap_or_default()
29273    }
29274}
29275impl Default for SYSTEM_TIME_DATA {
29276    fn default() -> Self {
29277        Self::DEFAULT.clone()
29278    }
29279}
29280impl MessageData for SYSTEM_TIME_DATA {
29281    type Message = MavMessage;
29282    const ID: u32 = 2u32;
29283    const NAME: &'static str = "SYSTEM_TIME";
29284    const EXTRA_CRC: u8 = 137u8;
29285    const ENCODED_LEN: usize = 12usize;
29286    fn deser(
29287        _version: MavlinkVersion,
29288        __input: &[u8],
29289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29290        let avail_len = __input.len();
29291        let mut payload_buf = [0; Self::ENCODED_LEN];
29292        let mut buf = if avail_len < Self::ENCODED_LEN {
29293            payload_buf[0..avail_len].copy_from_slice(__input);
29294            Bytes::new(&payload_buf)
29295        } else {
29296            Bytes::new(__input)
29297        };
29298        let mut __struct = Self::default();
29299        __struct.time_unix_usec = buf.get_u64_le();
29300        __struct.time_boot_ms = buf.get_u32_le();
29301        Ok(__struct)
29302    }
29303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29304        let mut __tmp = BytesMut::new(bytes);
29305        #[allow(clippy::absurd_extreme_comparisons)]
29306        #[allow(unused_comparisons)]
29307        if __tmp.remaining() < Self::ENCODED_LEN {
29308            panic!(
29309                "buffer is too small (need {} bytes, but got {})",
29310                Self::ENCODED_LEN,
29311                __tmp.remaining(),
29312            )
29313        }
29314        __tmp.put_u64_le(self.time_unix_usec);
29315        __tmp.put_u32_le(self.time_boot_ms);
29316        if matches!(version, MavlinkVersion::V2) {
29317            let len = __tmp.len();
29318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29319        } else {
29320            __tmp.len()
29321        }
29322    }
29323}
29324#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29325#[doc = ""]
29326#[doc = "ID: 1"]
29327#[derive(Debug, Clone, PartialEq)]
29328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29330#[cfg_attr(feature = "ts", derive(TS))]
29331#[cfg_attr(feature = "ts", ts(export))]
29332pub struct SYS_STATUS_DATA {
29333    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29334    pub onboard_control_sensors_present: MavSysStatusSensor,
29335    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29336    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29337    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29338    pub onboard_control_sensors_health: MavSysStatusSensor,
29339    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29340    pub load: u16,
29341    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29342    pub voltage_battery: u16,
29343    #[doc = "Battery current, -1: Current not sent by autopilot"]
29344    pub current_battery: i16,
29345    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29346    pub drop_rate_comm: u16,
29347    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29348    pub errors_comm: u16,
29349    #[doc = "Autopilot-specific errors"]
29350    pub errors_count1: u16,
29351    #[doc = "Autopilot-specific errors"]
29352    pub errors_count2: u16,
29353    #[doc = "Autopilot-specific errors"]
29354    pub errors_count3: u16,
29355    #[doc = "Autopilot-specific errors"]
29356    pub errors_count4: u16,
29357    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29358    pub battery_remaining: i8,
29359    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29360    #[cfg_attr(feature = "serde", serde(default))]
29361    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29362    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29363    #[cfg_attr(feature = "serde", serde(default))]
29364    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29365    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29366    #[cfg_attr(feature = "serde", serde(default))]
29367    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29368}
29369impl SYS_STATUS_DATA {
29370    pub const ENCODED_LEN: usize = 43usize;
29371    pub const DEFAULT: Self = Self {
29372        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29373        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29374        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29375        load: 0_u16,
29376        voltage_battery: 0_u16,
29377        current_battery: 0_i16,
29378        drop_rate_comm: 0_u16,
29379        errors_comm: 0_u16,
29380        errors_count1: 0_u16,
29381        errors_count2: 0_u16,
29382        errors_count3: 0_u16,
29383        errors_count4: 0_u16,
29384        battery_remaining: 0_i8,
29385        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29386        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29387        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29388    };
29389    #[cfg(feature = "arbitrary")]
29390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29391        use arbitrary::{Arbitrary, Unstructured};
29392        let mut buf = [0u8; 1024];
29393        rng.fill_bytes(&mut buf);
29394        let mut unstructured = Unstructured::new(&buf);
29395        Self::arbitrary(&mut unstructured).unwrap_or_default()
29396    }
29397}
29398impl Default for SYS_STATUS_DATA {
29399    fn default() -> Self {
29400        Self::DEFAULT.clone()
29401    }
29402}
29403impl MessageData for SYS_STATUS_DATA {
29404    type Message = MavMessage;
29405    const ID: u32 = 1u32;
29406    const NAME: &'static str = "SYS_STATUS";
29407    const EXTRA_CRC: u8 = 124u8;
29408    const ENCODED_LEN: usize = 43usize;
29409    fn deser(
29410        _version: MavlinkVersion,
29411        __input: &[u8],
29412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29413        let avail_len = __input.len();
29414        let mut payload_buf = [0; Self::ENCODED_LEN];
29415        let mut buf = if avail_len < Self::ENCODED_LEN {
29416            payload_buf[0..avail_len].copy_from_slice(__input);
29417            Bytes::new(&payload_buf)
29418        } else {
29419            Bytes::new(__input)
29420        };
29421        let mut __struct = Self::default();
29422        let tmp = buf.get_u32_le();
29423        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29424            tmp & MavSysStatusSensor::all().bits(),
29425        )
29426        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29427            flag_type: "MavSysStatusSensor",
29428            value: tmp as u32,
29429        })?;
29430        let tmp = buf.get_u32_le();
29431        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29432            tmp & MavSysStatusSensor::all().bits(),
29433        )
29434        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29435            flag_type: "MavSysStatusSensor",
29436            value: tmp as u32,
29437        })?;
29438        let tmp = buf.get_u32_le();
29439        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29440            tmp & MavSysStatusSensor::all().bits(),
29441        )
29442        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29443            flag_type: "MavSysStatusSensor",
29444            value: tmp as u32,
29445        })?;
29446        __struct.load = buf.get_u16_le();
29447        __struct.voltage_battery = buf.get_u16_le();
29448        __struct.current_battery = buf.get_i16_le();
29449        __struct.drop_rate_comm = buf.get_u16_le();
29450        __struct.errors_comm = buf.get_u16_le();
29451        __struct.errors_count1 = buf.get_u16_le();
29452        __struct.errors_count2 = buf.get_u16_le();
29453        __struct.errors_count3 = buf.get_u16_le();
29454        __struct.errors_count4 = buf.get_u16_le();
29455        __struct.battery_remaining = buf.get_i8();
29456        let tmp = buf.get_u32_le();
29457        __struct.onboard_control_sensors_present_extended =
29458            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29459                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29460                flag_type: "MavSysStatusSensorExtended",
29461                value: tmp as u32,
29462            })?;
29463        let tmp = buf.get_u32_le();
29464        __struct.onboard_control_sensors_enabled_extended =
29465            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29466                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29467                flag_type: "MavSysStatusSensorExtended",
29468                value: tmp as u32,
29469            })?;
29470        let tmp = buf.get_u32_le();
29471        __struct.onboard_control_sensors_health_extended =
29472            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29473                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29474                flag_type: "MavSysStatusSensorExtended",
29475                value: tmp as u32,
29476            })?;
29477        Ok(__struct)
29478    }
29479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29480        let mut __tmp = BytesMut::new(bytes);
29481        #[allow(clippy::absurd_extreme_comparisons)]
29482        #[allow(unused_comparisons)]
29483        if __tmp.remaining() < Self::ENCODED_LEN {
29484            panic!(
29485                "buffer is too small (need {} bytes, but got {})",
29486                Self::ENCODED_LEN,
29487                __tmp.remaining(),
29488            )
29489        }
29490        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29491        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29492        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29493        __tmp.put_u16_le(self.load);
29494        __tmp.put_u16_le(self.voltage_battery);
29495        __tmp.put_i16_le(self.current_battery);
29496        __tmp.put_u16_le(self.drop_rate_comm);
29497        __tmp.put_u16_le(self.errors_comm);
29498        __tmp.put_u16_le(self.errors_count1);
29499        __tmp.put_u16_le(self.errors_count2);
29500        __tmp.put_u16_le(self.errors_count3);
29501        __tmp.put_u16_le(self.errors_count4);
29502        __tmp.put_i8(self.battery_remaining);
29503        if matches!(version, MavlinkVersion::V2) {
29504            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29505            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29506            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29507            let len = __tmp.len();
29508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29509        } else {
29510            __tmp.len()
29511        }
29512    }
29513}
29514#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29515#[doc = ""]
29516#[doc = "ID: 135"]
29517#[derive(Debug, Clone, PartialEq)]
29518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29520#[cfg_attr(feature = "ts", derive(TS))]
29521#[cfg_attr(feature = "ts", ts(export))]
29522pub struct TERRAIN_CHECK_DATA {
29523    #[doc = "Latitude"]
29524    pub lat: i32,
29525    #[doc = "Longitude"]
29526    pub lon: i32,
29527}
29528impl TERRAIN_CHECK_DATA {
29529    pub const ENCODED_LEN: usize = 8usize;
29530    pub const DEFAULT: Self = Self {
29531        lat: 0_i32,
29532        lon: 0_i32,
29533    };
29534    #[cfg(feature = "arbitrary")]
29535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29536        use arbitrary::{Arbitrary, Unstructured};
29537        let mut buf = [0u8; 1024];
29538        rng.fill_bytes(&mut buf);
29539        let mut unstructured = Unstructured::new(&buf);
29540        Self::arbitrary(&mut unstructured).unwrap_or_default()
29541    }
29542}
29543impl Default for TERRAIN_CHECK_DATA {
29544    fn default() -> Self {
29545        Self::DEFAULT.clone()
29546    }
29547}
29548impl MessageData for TERRAIN_CHECK_DATA {
29549    type Message = MavMessage;
29550    const ID: u32 = 135u32;
29551    const NAME: &'static str = "TERRAIN_CHECK";
29552    const EXTRA_CRC: u8 = 203u8;
29553    const ENCODED_LEN: usize = 8usize;
29554    fn deser(
29555        _version: MavlinkVersion,
29556        __input: &[u8],
29557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29558        let avail_len = __input.len();
29559        let mut payload_buf = [0; Self::ENCODED_LEN];
29560        let mut buf = if avail_len < Self::ENCODED_LEN {
29561            payload_buf[0..avail_len].copy_from_slice(__input);
29562            Bytes::new(&payload_buf)
29563        } else {
29564            Bytes::new(__input)
29565        };
29566        let mut __struct = Self::default();
29567        __struct.lat = buf.get_i32_le();
29568        __struct.lon = buf.get_i32_le();
29569        Ok(__struct)
29570    }
29571    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29572        let mut __tmp = BytesMut::new(bytes);
29573        #[allow(clippy::absurd_extreme_comparisons)]
29574        #[allow(unused_comparisons)]
29575        if __tmp.remaining() < Self::ENCODED_LEN {
29576            panic!(
29577                "buffer is too small (need {} bytes, but got {})",
29578                Self::ENCODED_LEN,
29579                __tmp.remaining(),
29580            )
29581        }
29582        __tmp.put_i32_le(self.lat);
29583        __tmp.put_i32_le(self.lon);
29584        if matches!(version, MavlinkVersion::V2) {
29585            let len = __tmp.len();
29586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29587        } else {
29588            __tmp.len()
29589        }
29590    }
29591}
29592#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29593#[doc = ""]
29594#[doc = "ID: 134"]
29595#[derive(Debug, Clone, PartialEq)]
29596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29598#[cfg_attr(feature = "ts", derive(TS))]
29599#[cfg_attr(feature = "ts", ts(export))]
29600pub struct TERRAIN_DATA_DATA {
29601    #[doc = "Latitude of SW corner of first grid"]
29602    pub lat: i32,
29603    #[doc = "Longitude of SW corner of first grid"]
29604    pub lon: i32,
29605    #[doc = "Grid spacing"]
29606    pub grid_spacing: u16,
29607    #[doc = "Terrain data MSL"]
29608    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29609    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29610    pub data: [i16; 16],
29611    #[doc = "bit within the terrain request mask"]
29612    pub gridbit: u8,
29613}
29614impl TERRAIN_DATA_DATA {
29615    pub const ENCODED_LEN: usize = 43usize;
29616    pub const DEFAULT: Self = Self {
29617        lat: 0_i32,
29618        lon: 0_i32,
29619        grid_spacing: 0_u16,
29620        data: [0_i16; 16usize],
29621        gridbit: 0_u8,
29622    };
29623    #[cfg(feature = "arbitrary")]
29624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29625        use arbitrary::{Arbitrary, Unstructured};
29626        let mut buf = [0u8; 1024];
29627        rng.fill_bytes(&mut buf);
29628        let mut unstructured = Unstructured::new(&buf);
29629        Self::arbitrary(&mut unstructured).unwrap_or_default()
29630    }
29631}
29632impl Default for TERRAIN_DATA_DATA {
29633    fn default() -> Self {
29634        Self::DEFAULT.clone()
29635    }
29636}
29637impl MessageData for TERRAIN_DATA_DATA {
29638    type Message = MavMessage;
29639    const ID: u32 = 134u32;
29640    const NAME: &'static str = "TERRAIN_DATA";
29641    const EXTRA_CRC: u8 = 229u8;
29642    const ENCODED_LEN: usize = 43usize;
29643    fn deser(
29644        _version: MavlinkVersion,
29645        __input: &[u8],
29646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29647        let avail_len = __input.len();
29648        let mut payload_buf = [0; Self::ENCODED_LEN];
29649        let mut buf = if avail_len < Self::ENCODED_LEN {
29650            payload_buf[0..avail_len].copy_from_slice(__input);
29651            Bytes::new(&payload_buf)
29652        } else {
29653            Bytes::new(__input)
29654        };
29655        let mut __struct = Self::default();
29656        __struct.lat = buf.get_i32_le();
29657        __struct.lon = buf.get_i32_le();
29658        __struct.grid_spacing = buf.get_u16_le();
29659        for v in &mut __struct.data {
29660            let val = buf.get_i16_le();
29661            *v = val;
29662        }
29663        __struct.gridbit = buf.get_u8();
29664        Ok(__struct)
29665    }
29666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29667        let mut __tmp = BytesMut::new(bytes);
29668        #[allow(clippy::absurd_extreme_comparisons)]
29669        #[allow(unused_comparisons)]
29670        if __tmp.remaining() < Self::ENCODED_LEN {
29671            panic!(
29672                "buffer is too small (need {} bytes, but got {})",
29673                Self::ENCODED_LEN,
29674                __tmp.remaining(),
29675            )
29676        }
29677        __tmp.put_i32_le(self.lat);
29678        __tmp.put_i32_le(self.lon);
29679        __tmp.put_u16_le(self.grid_spacing);
29680        for val in &self.data {
29681            __tmp.put_i16_le(*val);
29682        }
29683        __tmp.put_u8(self.gridbit);
29684        if matches!(version, MavlinkVersion::V2) {
29685            let len = __tmp.len();
29686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29687        } else {
29688            __tmp.len()
29689        }
29690    }
29691}
29692#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29693#[doc = ""]
29694#[doc = "ID: 136"]
29695#[derive(Debug, Clone, PartialEq)]
29696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29698#[cfg_attr(feature = "ts", derive(TS))]
29699#[cfg_attr(feature = "ts", ts(export))]
29700pub struct TERRAIN_REPORT_DATA {
29701    #[doc = "Latitude"]
29702    pub lat: i32,
29703    #[doc = "Longitude"]
29704    pub lon: i32,
29705    #[doc = "Terrain height MSL"]
29706    pub terrain_height: f32,
29707    #[doc = "Current vehicle height above lat/lon terrain height"]
29708    pub current_height: f32,
29709    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29710    pub spacing: u16,
29711    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29712    pub pending: u16,
29713    #[doc = "Number of 4x4 terrain blocks in memory"]
29714    pub loaded: u16,
29715}
29716impl TERRAIN_REPORT_DATA {
29717    pub const ENCODED_LEN: usize = 22usize;
29718    pub const DEFAULT: Self = Self {
29719        lat: 0_i32,
29720        lon: 0_i32,
29721        terrain_height: 0.0_f32,
29722        current_height: 0.0_f32,
29723        spacing: 0_u16,
29724        pending: 0_u16,
29725        loaded: 0_u16,
29726    };
29727    #[cfg(feature = "arbitrary")]
29728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29729        use arbitrary::{Arbitrary, Unstructured};
29730        let mut buf = [0u8; 1024];
29731        rng.fill_bytes(&mut buf);
29732        let mut unstructured = Unstructured::new(&buf);
29733        Self::arbitrary(&mut unstructured).unwrap_or_default()
29734    }
29735}
29736impl Default for TERRAIN_REPORT_DATA {
29737    fn default() -> Self {
29738        Self::DEFAULT.clone()
29739    }
29740}
29741impl MessageData for TERRAIN_REPORT_DATA {
29742    type Message = MavMessage;
29743    const ID: u32 = 136u32;
29744    const NAME: &'static str = "TERRAIN_REPORT";
29745    const EXTRA_CRC: u8 = 1u8;
29746    const ENCODED_LEN: usize = 22usize;
29747    fn deser(
29748        _version: MavlinkVersion,
29749        __input: &[u8],
29750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29751        let avail_len = __input.len();
29752        let mut payload_buf = [0; Self::ENCODED_LEN];
29753        let mut buf = if avail_len < Self::ENCODED_LEN {
29754            payload_buf[0..avail_len].copy_from_slice(__input);
29755            Bytes::new(&payload_buf)
29756        } else {
29757            Bytes::new(__input)
29758        };
29759        let mut __struct = Self::default();
29760        __struct.lat = buf.get_i32_le();
29761        __struct.lon = buf.get_i32_le();
29762        __struct.terrain_height = buf.get_f32_le();
29763        __struct.current_height = buf.get_f32_le();
29764        __struct.spacing = buf.get_u16_le();
29765        __struct.pending = buf.get_u16_le();
29766        __struct.loaded = buf.get_u16_le();
29767        Ok(__struct)
29768    }
29769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29770        let mut __tmp = BytesMut::new(bytes);
29771        #[allow(clippy::absurd_extreme_comparisons)]
29772        #[allow(unused_comparisons)]
29773        if __tmp.remaining() < Self::ENCODED_LEN {
29774            panic!(
29775                "buffer is too small (need {} bytes, but got {})",
29776                Self::ENCODED_LEN,
29777                __tmp.remaining(),
29778            )
29779        }
29780        __tmp.put_i32_le(self.lat);
29781        __tmp.put_i32_le(self.lon);
29782        __tmp.put_f32_le(self.terrain_height);
29783        __tmp.put_f32_le(self.current_height);
29784        __tmp.put_u16_le(self.spacing);
29785        __tmp.put_u16_le(self.pending);
29786        __tmp.put_u16_le(self.loaded);
29787        if matches!(version, MavlinkVersion::V2) {
29788            let len = __tmp.len();
29789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29790        } else {
29791            __tmp.len()
29792        }
29793    }
29794}
29795#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29796#[doc = ""]
29797#[doc = "ID: 133"]
29798#[derive(Debug, Clone, PartialEq)]
29799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29801#[cfg_attr(feature = "ts", derive(TS))]
29802#[cfg_attr(feature = "ts", ts(export))]
29803pub struct TERRAIN_REQUEST_DATA {
29804    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29805    pub mask: u64,
29806    #[doc = "Latitude of SW corner of first grid"]
29807    pub lat: i32,
29808    #[doc = "Longitude of SW corner of first grid"]
29809    pub lon: i32,
29810    #[doc = "Grid spacing"]
29811    pub grid_spacing: u16,
29812}
29813impl TERRAIN_REQUEST_DATA {
29814    pub const ENCODED_LEN: usize = 18usize;
29815    pub const DEFAULT: Self = Self {
29816        mask: 0_u64,
29817        lat: 0_i32,
29818        lon: 0_i32,
29819        grid_spacing: 0_u16,
29820    };
29821    #[cfg(feature = "arbitrary")]
29822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29823        use arbitrary::{Arbitrary, Unstructured};
29824        let mut buf = [0u8; 1024];
29825        rng.fill_bytes(&mut buf);
29826        let mut unstructured = Unstructured::new(&buf);
29827        Self::arbitrary(&mut unstructured).unwrap_or_default()
29828    }
29829}
29830impl Default for TERRAIN_REQUEST_DATA {
29831    fn default() -> Self {
29832        Self::DEFAULT.clone()
29833    }
29834}
29835impl MessageData for TERRAIN_REQUEST_DATA {
29836    type Message = MavMessage;
29837    const ID: u32 = 133u32;
29838    const NAME: &'static str = "TERRAIN_REQUEST";
29839    const EXTRA_CRC: u8 = 6u8;
29840    const ENCODED_LEN: usize = 18usize;
29841    fn deser(
29842        _version: MavlinkVersion,
29843        __input: &[u8],
29844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29845        let avail_len = __input.len();
29846        let mut payload_buf = [0; Self::ENCODED_LEN];
29847        let mut buf = if avail_len < Self::ENCODED_LEN {
29848            payload_buf[0..avail_len].copy_from_slice(__input);
29849            Bytes::new(&payload_buf)
29850        } else {
29851            Bytes::new(__input)
29852        };
29853        let mut __struct = Self::default();
29854        __struct.mask = buf.get_u64_le();
29855        __struct.lat = buf.get_i32_le();
29856        __struct.lon = buf.get_i32_le();
29857        __struct.grid_spacing = buf.get_u16_le();
29858        Ok(__struct)
29859    }
29860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29861        let mut __tmp = BytesMut::new(bytes);
29862        #[allow(clippy::absurd_extreme_comparisons)]
29863        #[allow(unused_comparisons)]
29864        if __tmp.remaining() < Self::ENCODED_LEN {
29865            panic!(
29866                "buffer is too small (need {} bytes, but got {})",
29867                Self::ENCODED_LEN,
29868                __tmp.remaining(),
29869            )
29870        }
29871        __tmp.put_u64_le(self.mask);
29872        __tmp.put_i32_le(self.lat);
29873        __tmp.put_i32_le(self.lon);
29874        __tmp.put_u16_le(self.grid_spacing);
29875        if matches!(version, MavlinkVersion::V2) {
29876            let len = __tmp.len();
29877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29878        } else {
29879            __tmp.len()
29880        }
29881    }
29882}
29883#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29884#[doc = ""]
29885#[doc = "ID: 111"]
29886#[derive(Debug, Clone, PartialEq)]
29887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29889#[cfg_attr(feature = "ts", derive(TS))]
29890#[cfg_attr(feature = "ts", ts(export))]
29891pub struct TIMESYNC_DATA {
29892    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29893    pub tc1: i64,
29894    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29895    pub ts1: i64,
29896    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29897    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29898    pub target_system: u8,
29899    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29900    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29901    pub target_component: u8,
29902}
29903impl TIMESYNC_DATA {
29904    pub const ENCODED_LEN: usize = 18usize;
29905    pub const DEFAULT: Self = Self {
29906        tc1: 0_i64,
29907        ts1: 0_i64,
29908        target_system: 0_u8,
29909        target_component: 0_u8,
29910    };
29911    #[cfg(feature = "arbitrary")]
29912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29913        use arbitrary::{Arbitrary, Unstructured};
29914        let mut buf = [0u8; 1024];
29915        rng.fill_bytes(&mut buf);
29916        let mut unstructured = Unstructured::new(&buf);
29917        Self::arbitrary(&mut unstructured).unwrap_or_default()
29918    }
29919}
29920impl Default for TIMESYNC_DATA {
29921    fn default() -> Self {
29922        Self::DEFAULT.clone()
29923    }
29924}
29925impl MessageData for TIMESYNC_DATA {
29926    type Message = MavMessage;
29927    const ID: u32 = 111u32;
29928    const NAME: &'static str = "TIMESYNC";
29929    const EXTRA_CRC: u8 = 34u8;
29930    const ENCODED_LEN: usize = 18usize;
29931    fn deser(
29932        _version: MavlinkVersion,
29933        __input: &[u8],
29934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29935        let avail_len = __input.len();
29936        let mut payload_buf = [0; Self::ENCODED_LEN];
29937        let mut buf = if avail_len < Self::ENCODED_LEN {
29938            payload_buf[0..avail_len].copy_from_slice(__input);
29939            Bytes::new(&payload_buf)
29940        } else {
29941            Bytes::new(__input)
29942        };
29943        let mut __struct = Self::default();
29944        __struct.tc1 = buf.get_i64_le();
29945        __struct.ts1 = buf.get_i64_le();
29946        __struct.target_system = buf.get_u8();
29947        __struct.target_component = buf.get_u8();
29948        Ok(__struct)
29949    }
29950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29951        let mut __tmp = BytesMut::new(bytes);
29952        #[allow(clippy::absurd_extreme_comparisons)]
29953        #[allow(unused_comparisons)]
29954        if __tmp.remaining() < Self::ENCODED_LEN {
29955            panic!(
29956                "buffer is too small (need {} bytes, but got {})",
29957                Self::ENCODED_LEN,
29958                __tmp.remaining(),
29959            )
29960        }
29961        __tmp.put_i64_le(self.tc1);
29962        __tmp.put_i64_le(self.ts1);
29963        if matches!(version, MavlinkVersion::V2) {
29964            __tmp.put_u8(self.target_system);
29965            __tmp.put_u8(self.target_component);
29966            let len = __tmp.len();
29967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29968        } else {
29969            __tmp.len()
29970        }
29971    }
29972}
29973#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29974#[doc = ""]
29975#[doc = "ID: 380"]
29976#[derive(Debug, Clone, PartialEq)]
29977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29979#[cfg_attr(feature = "ts", derive(TS))]
29980#[cfg_attr(feature = "ts", ts(export))]
29981pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29982    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29983    pub safe_return: i32,
29984    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29985    pub land: i32,
29986    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29987    pub mission_next_item: i32,
29988    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29989    pub mission_end: i32,
29990    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29991    pub commanded_action: i32,
29992}
29993impl TIME_ESTIMATE_TO_TARGET_DATA {
29994    pub const ENCODED_LEN: usize = 20usize;
29995    pub const DEFAULT: Self = Self {
29996        safe_return: 0_i32,
29997        land: 0_i32,
29998        mission_next_item: 0_i32,
29999        mission_end: 0_i32,
30000        commanded_action: 0_i32,
30001    };
30002    #[cfg(feature = "arbitrary")]
30003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30004        use arbitrary::{Arbitrary, Unstructured};
30005        let mut buf = [0u8; 1024];
30006        rng.fill_bytes(&mut buf);
30007        let mut unstructured = Unstructured::new(&buf);
30008        Self::arbitrary(&mut unstructured).unwrap_or_default()
30009    }
30010}
30011impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30012    fn default() -> Self {
30013        Self::DEFAULT.clone()
30014    }
30015}
30016impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30017    type Message = MavMessage;
30018    const ID: u32 = 380u32;
30019    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30020    const EXTRA_CRC: u8 = 232u8;
30021    const ENCODED_LEN: usize = 20usize;
30022    fn deser(
30023        _version: MavlinkVersion,
30024        __input: &[u8],
30025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30026        let avail_len = __input.len();
30027        let mut payload_buf = [0; Self::ENCODED_LEN];
30028        let mut buf = if avail_len < Self::ENCODED_LEN {
30029            payload_buf[0..avail_len].copy_from_slice(__input);
30030            Bytes::new(&payload_buf)
30031        } else {
30032            Bytes::new(__input)
30033        };
30034        let mut __struct = Self::default();
30035        __struct.safe_return = buf.get_i32_le();
30036        __struct.land = buf.get_i32_le();
30037        __struct.mission_next_item = buf.get_i32_le();
30038        __struct.mission_end = buf.get_i32_le();
30039        __struct.commanded_action = buf.get_i32_le();
30040        Ok(__struct)
30041    }
30042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30043        let mut __tmp = BytesMut::new(bytes);
30044        #[allow(clippy::absurd_extreme_comparisons)]
30045        #[allow(unused_comparisons)]
30046        if __tmp.remaining() < Self::ENCODED_LEN {
30047            panic!(
30048                "buffer is too small (need {} bytes, but got {})",
30049                Self::ENCODED_LEN,
30050                __tmp.remaining(),
30051            )
30052        }
30053        __tmp.put_i32_le(self.safe_return);
30054        __tmp.put_i32_le(self.land);
30055        __tmp.put_i32_le(self.mission_next_item);
30056        __tmp.put_i32_le(self.mission_end);
30057        __tmp.put_i32_le(self.commanded_action);
30058        if matches!(version, MavlinkVersion::V2) {
30059            let len = __tmp.len();
30060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30061        } else {
30062            __tmp.len()
30063        }
30064    }
30065}
30066#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30067#[doc = ""]
30068#[doc = "ID: 333"]
30069#[derive(Debug, Clone, PartialEq)]
30070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30072#[cfg_attr(feature = "ts", derive(TS))]
30073#[cfg_attr(feature = "ts", ts(export))]
30074pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30075    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30076    pub time_usec: u64,
30077    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30079    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30080    pub pos_x: [f32; 5],
30081    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30082    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30083    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30084    pub pos_y: [f32; 5],
30085    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30087    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30088    pub pos_z: [f32; 5],
30089    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30092    pub delta: [f32; 5],
30093    #[doc = "Yaw. Set to NaN for unchanged"]
30094    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30095    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30096    pub pos_yaw: [f32; 5],
30097    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30098    pub valid_points: u8,
30099}
30100impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30101    pub const ENCODED_LEN: usize = 109usize;
30102    pub const DEFAULT: Self = Self {
30103        time_usec: 0_u64,
30104        pos_x: [0.0_f32; 5usize],
30105        pos_y: [0.0_f32; 5usize],
30106        pos_z: [0.0_f32; 5usize],
30107        delta: [0.0_f32; 5usize],
30108        pos_yaw: [0.0_f32; 5usize],
30109        valid_points: 0_u8,
30110    };
30111    #[cfg(feature = "arbitrary")]
30112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30113        use arbitrary::{Arbitrary, Unstructured};
30114        let mut buf = [0u8; 1024];
30115        rng.fill_bytes(&mut buf);
30116        let mut unstructured = Unstructured::new(&buf);
30117        Self::arbitrary(&mut unstructured).unwrap_or_default()
30118    }
30119}
30120impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30121    fn default() -> Self {
30122        Self::DEFAULT.clone()
30123    }
30124}
30125impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30126    type Message = MavMessage;
30127    const ID: u32 = 333u32;
30128    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30129    const EXTRA_CRC: u8 = 231u8;
30130    const ENCODED_LEN: usize = 109usize;
30131    fn deser(
30132        _version: MavlinkVersion,
30133        __input: &[u8],
30134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30135        let avail_len = __input.len();
30136        let mut payload_buf = [0; Self::ENCODED_LEN];
30137        let mut buf = if avail_len < Self::ENCODED_LEN {
30138            payload_buf[0..avail_len].copy_from_slice(__input);
30139            Bytes::new(&payload_buf)
30140        } else {
30141            Bytes::new(__input)
30142        };
30143        let mut __struct = Self::default();
30144        __struct.time_usec = buf.get_u64_le();
30145        for v in &mut __struct.pos_x {
30146            let val = buf.get_f32_le();
30147            *v = val;
30148        }
30149        for v in &mut __struct.pos_y {
30150            let val = buf.get_f32_le();
30151            *v = val;
30152        }
30153        for v in &mut __struct.pos_z {
30154            let val = buf.get_f32_le();
30155            *v = val;
30156        }
30157        for v in &mut __struct.delta {
30158            let val = buf.get_f32_le();
30159            *v = val;
30160        }
30161        for v in &mut __struct.pos_yaw {
30162            let val = buf.get_f32_le();
30163            *v = val;
30164        }
30165        __struct.valid_points = buf.get_u8();
30166        Ok(__struct)
30167    }
30168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30169        let mut __tmp = BytesMut::new(bytes);
30170        #[allow(clippy::absurd_extreme_comparisons)]
30171        #[allow(unused_comparisons)]
30172        if __tmp.remaining() < Self::ENCODED_LEN {
30173            panic!(
30174                "buffer is too small (need {} bytes, but got {})",
30175                Self::ENCODED_LEN,
30176                __tmp.remaining(),
30177            )
30178        }
30179        __tmp.put_u64_le(self.time_usec);
30180        for val in &self.pos_x {
30181            __tmp.put_f32_le(*val);
30182        }
30183        for val in &self.pos_y {
30184            __tmp.put_f32_le(*val);
30185        }
30186        for val in &self.pos_z {
30187            __tmp.put_f32_le(*val);
30188        }
30189        for val in &self.delta {
30190            __tmp.put_f32_le(*val);
30191        }
30192        for val in &self.pos_yaw {
30193            __tmp.put_f32_le(*val);
30194        }
30195        __tmp.put_u8(self.valid_points);
30196        if matches!(version, MavlinkVersion::V2) {
30197            let len = __tmp.len();
30198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30199        } else {
30200            __tmp.len()
30201        }
30202    }
30203}
30204#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30205#[doc = ""]
30206#[doc = "ID: 332"]
30207#[derive(Debug, Clone, PartialEq)]
30208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30210#[cfg_attr(feature = "ts", derive(TS))]
30211#[cfg_attr(feature = "ts", ts(export))]
30212pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30213    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30214    pub time_usec: u64,
30215    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30216    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30217    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30218    pub pos_x: [f32; 5],
30219    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30222    pub pos_y: [f32; 5],
30223    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30226    pub pos_z: [f32; 5],
30227    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30228    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30229    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30230    pub vel_x: [f32; 5],
30231    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30233    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30234    pub vel_y: [f32; 5],
30235    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30238    pub vel_z: [f32; 5],
30239    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30242    pub acc_x: [f32; 5],
30243    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30246    pub acc_y: [f32; 5],
30247    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30249    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30250    pub acc_z: [f32; 5],
30251    #[doc = "Yaw angle, set to NaN if not being used"]
30252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30253    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30254    pub pos_yaw: [f32; 5],
30255    #[doc = "Yaw rate, set to NaN if not being used"]
30256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30257    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30258    pub vel_yaw: [f32; 5],
30259    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30261    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30262    pub command: [u16; 5],
30263    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30264    pub valid_points: u8,
30265}
30266impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30267    pub const ENCODED_LEN: usize = 239usize;
30268    pub const DEFAULT: Self = Self {
30269        time_usec: 0_u64,
30270        pos_x: [0.0_f32; 5usize],
30271        pos_y: [0.0_f32; 5usize],
30272        pos_z: [0.0_f32; 5usize],
30273        vel_x: [0.0_f32; 5usize],
30274        vel_y: [0.0_f32; 5usize],
30275        vel_z: [0.0_f32; 5usize],
30276        acc_x: [0.0_f32; 5usize],
30277        acc_y: [0.0_f32; 5usize],
30278        acc_z: [0.0_f32; 5usize],
30279        pos_yaw: [0.0_f32; 5usize],
30280        vel_yaw: [0.0_f32; 5usize],
30281        command: [0_u16; 5usize],
30282        valid_points: 0_u8,
30283    };
30284    #[cfg(feature = "arbitrary")]
30285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30286        use arbitrary::{Arbitrary, Unstructured};
30287        let mut buf = [0u8; 1024];
30288        rng.fill_bytes(&mut buf);
30289        let mut unstructured = Unstructured::new(&buf);
30290        Self::arbitrary(&mut unstructured).unwrap_or_default()
30291    }
30292}
30293impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30294    fn default() -> Self {
30295        Self::DEFAULT.clone()
30296    }
30297}
30298impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30299    type Message = MavMessage;
30300    const ID: u32 = 332u32;
30301    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30302    const EXTRA_CRC: u8 = 236u8;
30303    const ENCODED_LEN: usize = 239usize;
30304    fn deser(
30305        _version: MavlinkVersion,
30306        __input: &[u8],
30307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30308        let avail_len = __input.len();
30309        let mut payload_buf = [0; Self::ENCODED_LEN];
30310        let mut buf = if avail_len < Self::ENCODED_LEN {
30311            payload_buf[0..avail_len].copy_from_slice(__input);
30312            Bytes::new(&payload_buf)
30313        } else {
30314            Bytes::new(__input)
30315        };
30316        let mut __struct = Self::default();
30317        __struct.time_usec = buf.get_u64_le();
30318        for v in &mut __struct.pos_x {
30319            let val = buf.get_f32_le();
30320            *v = val;
30321        }
30322        for v in &mut __struct.pos_y {
30323            let val = buf.get_f32_le();
30324            *v = val;
30325        }
30326        for v in &mut __struct.pos_z {
30327            let val = buf.get_f32_le();
30328            *v = val;
30329        }
30330        for v in &mut __struct.vel_x {
30331            let val = buf.get_f32_le();
30332            *v = val;
30333        }
30334        for v in &mut __struct.vel_y {
30335            let val = buf.get_f32_le();
30336            *v = val;
30337        }
30338        for v in &mut __struct.vel_z {
30339            let val = buf.get_f32_le();
30340            *v = val;
30341        }
30342        for v in &mut __struct.acc_x {
30343            let val = buf.get_f32_le();
30344            *v = val;
30345        }
30346        for v in &mut __struct.acc_y {
30347            let val = buf.get_f32_le();
30348            *v = val;
30349        }
30350        for v in &mut __struct.acc_z {
30351            let val = buf.get_f32_le();
30352            *v = val;
30353        }
30354        for v in &mut __struct.pos_yaw {
30355            let val = buf.get_f32_le();
30356            *v = val;
30357        }
30358        for v in &mut __struct.vel_yaw {
30359            let val = buf.get_f32_le();
30360            *v = val;
30361        }
30362        for v in &mut __struct.command {
30363            let val = buf.get_u16_le();
30364            *v = val;
30365        }
30366        __struct.valid_points = buf.get_u8();
30367        Ok(__struct)
30368    }
30369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30370        let mut __tmp = BytesMut::new(bytes);
30371        #[allow(clippy::absurd_extreme_comparisons)]
30372        #[allow(unused_comparisons)]
30373        if __tmp.remaining() < Self::ENCODED_LEN {
30374            panic!(
30375                "buffer is too small (need {} bytes, but got {})",
30376                Self::ENCODED_LEN,
30377                __tmp.remaining(),
30378            )
30379        }
30380        __tmp.put_u64_le(self.time_usec);
30381        for val in &self.pos_x {
30382            __tmp.put_f32_le(*val);
30383        }
30384        for val in &self.pos_y {
30385            __tmp.put_f32_le(*val);
30386        }
30387        for val in &self.pos_z {
30388            __tmp.put_f32_le(*val);
30389        }
30390        for val in &self.vel_x {
30391            __tmp.put_f32_le(*val);
30392        }
30393        for val in &self.vel_y {
30394            __tmp.put_f32_le(*val);
30395        }
30396        for val in &self.vel_z {
30397            __tmp.put_f32_le(*val);
30398        }
30399        for val in &self.acc_x {
30400            __tmp.put_f32_le(*val);
30401        }
30402        for val in &self.acc_y {
30403            __tmp.put_f32_le(*val);
30404        }
30405        for val in &self.acc_z {
30406            __tmp.put_f32_le(*val);
30407        }
30408        for val in &self.pos_yaw {
30409            __tmp.put_f32_le(*val);
30410        }
30411        for val in &self.vel_yaw {
30412            __tmp.put_f32_le(*val);
30413        }
30414        for val in &self.command {
30415            __tmp.put_u16_le(*val);
30416        }
30417        __tmp.put_u8(self.valid_points);
30418        if matches!(version, MavlinkVersion::V2) {
30419            let len = __tmp.len();
30420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30421        } else {
30422            __tmp.len()
30423        }
30424    }
30425}
30426#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30427#[doc = ""]
30428#[doc = "ID: 385"]
30429#[derive(Debug, Clone, PartialEq)]
30430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30432#[cfg_attr(feature = "ts", derive(TS))]
30433#[cfg_attr(feature = "ts", ts(export))]
30434pub struct TUNNEL_DATA {
30435    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30436    pub payload_type: MavTunnelPayloadType,
30437    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30438    pub target_system: u8,
30439    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30440    pub target_component: u8,
30441    #[doc = "Length of the data transported in payload"]
30442    pub payload_length: u8,
30443    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30446    pub payload: [u8; 128],
30447}
30448impl TUNNEL_DATA {
30449    pub const ENCODED_LEN: usize = 133usize;
30450    pub const DEFAULT: Self = Self {
30451        payload_type: MavTunnelPayloadType::DEFAULT,
30452        target_system: 0_u8,
30453        target_component: 0_u8,
30454        payload_length: 0_u8,
30455        payload: [0_u8; 128usize],
30456    };
30457    #[cfg(feature = "arbitrary")]
30458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30459        use arbitrary::{Arbitrary, Unstructured};
30460        let mut buf = [0u8; 1024];
30461        rng.fill_bytes(&mut buf);
30462        let mut unstructured = Unstructured::new(&buf);
30463        Self::arbitrary(&mut unstructured).unwrap_or_default()
30464    }
30465}
30466impl Default for TUNNEL_DATA {
30467    fn default() -> Self {
30468        Self::DEFAULT.clone()
30469    }
30470}
30471impl MessageData for TUNNEL_DATA {
30472    type Message = MavMessage;
30473    const ID: u32 = 385u32;
30474    const NAME: &'static str = "TUNNEL";
30475    const EXTRA_CRC: u8 = 147u8;
30476    const ENCODED_LEN: usize = 133usize;
30477    fn deser(
30478        _version: MavlinkVersion,
30479        __input: &[u8],
30480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30481        let avail_len = __input.len();
30482        let mut payload_buf = [0; Self::ENCODED_LEN];
30483        let mut buf = if avail_len < Self::ENCODED_LEN {
30484            payload_buf[0..avail_len].copy_from_slice(__input);
30485            Bytes::new(&payload_buf)
30486        } else {
30487            Bytes::new(__input)
30488        };
30489        let mut __struct = Self::default();
30490        let tmp = buf.get_u16_le();
30491        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30492            ::mavlink_core::error::ParserError::InvalidEnum {
30493                enum_type: "MavTunnelPayloadType",
30494                value: tmp as u32,
30495            },
30496        )?;
30497        __struct.target_system = buf.get_u8();
30498        __struct.target_component = buf.get_u8();
30499        __struct.payload_length = buf.get_u8();
30500        for v in &mut __struct.payload {
30501            let val = buf.get_u8();
30502            *v = val;
30503        }
30504        Ok(__struct)
30505    }
30506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30507        let mut __tmp = BytesMut::new(bytes);
30508        #[allow(clippy::absurd_extreme_comparisons)]
30509        #[allow(unused_comparisons)]
30510        if __tmp.remaining() < Self::ENCODED_LEN {
30511            panic!(
30512                "buffer is too small (need {} bytes, but got {})",
30513                Self::ENCODED_LEN,
30514                __tmp.remaining(),
30515            )
30516        }
30517        __tmp.put_u16_le(self.payload_type as u16);
30518        __tmp.put_u8(self.target_system);
30519        __tmp.put_u8(self.target_component);
30520        __tmp.put_u8(self.payload_length);
30521        for val in &self.payload {
30522            __tmp.put_u8(*val);
30523        }
30524        if matches!(version, MavlinkVersion::V2) {
30525            let len = __tmp.len();
30526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30527        } else {
30528            __tmp.len()
30529        }
30530    }
30531}
30532#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30533#[doc = ""]
30534#[doc = "ID: 311"]
30535#[derive(Debug, Clone, PartialEq)]
30536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30538#[cfg_attr(feature = "ts", derive(TS))]
30539#[cfg_attr(feature = "ts", ts(export))]
30540pub struct UAVCAN_NODE_INFO_DATA {
30541    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30542    pub time_usec: u64,
30543    #[doc = "Time since the start-up of the node."]
30544    pub uptime_sec: u32,
30545    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30546    pub sw_vcs_commit: u32,
30547    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30548    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30549    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30550    pub name: [u8; 80],
30551    #[doc = "Hardware major version number."]
30552    pub hw_version_major: u8,
30553    #[doc = "Hardware minor version number."]
30554    pub hw_version_minor: u8,
30555    #[doc = "Hardware unique 128-bit ID."]
30556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30557    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30558    pub hw_unique_id: [u8; 16],
30559    #[doc = "Software major version number."]
30560    pub sw_version_major: u8,
30561    #[doc = "Software minor version number."]
30562    pub sw_version_minor: u8,
30563}
30564impl UAVCAN_NODE_INFO_DATA {
30565    pub const ENCODED_LEN: usize = 116usize;
30566    pub const DEFAULT: Self = Self {
30567        time_usec: 0_u64,
30568        uptime_sec: 0_u32,
30569        sw_vcs_commit: 0_u32,
30570        name: [0_u8; 80usize],
30571        hw_version_major: 0_u8,
30572        hw_version_minor: 0_u8,
30573        hw_unique_id: [0_u8; 16usize],
30574        sw_version_major: 0_u8,
30575        sw_version_minor: 0_u8,
30576    };
30577    #[cfg(feature = "arbitrary")]
30578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30579        use arbitrary::{Arbitrary, Unstructured};
30580        let mut buf = [0u8; 1024];
30581        rng.fill_bytes(&mut buf);
30582        let mut unstructured = Unstructured::new(&buf);
30583        Self::arbitrary(&mut unstructured).unwrap_or_default()
30584    }
30585}
30586impl Default for UAVCAN_NODE_INFO_DATA {
30587    fn default() -> Self {
30588        Self::DEFAULT.clone()
30589    }
30590}
30591impl MessageData for UAVCAN_NODE_INFO_DATA {
30592    type Message = MavMessage;
30593    const ID: u32 = 311u32;
30594    const NAME: &'static str = "UAVCAN_NODE_INFO";
30595    const EXTRA_CRC: u8 = 95u8;
30596    const ENCODED_LEN: usize = 116usize;
30597    fn deser(
30598        _version: MavlinkVersion,
30599        __input: &[u8],
30600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30601        let avail_len = __input.len();
30602        let mut payload_buf = [0; Self::ENCODED_LEN];
30603        let mut buf = if avail_len < Self::ENCODED_LEN {
30604            payload_buf[0..avail_len].copy_from_slice(__input);
30605            Bytes::new(&payload_buf)
30606        } else {
30607            Bytes::new(__input)
30608        };
30609        let mut __struct = Self::default();
30610        __struct.time_usec = buf.get_u64_le();
30611        __struct.uptime_sec = buf.get_u32_le();
30612        __struct.sw_vcs_commit = buf.get_u32_le();
30613        for v in &mut __struct.name {
30614            let val = buf.get_u8();
30615            *v = val;
30616        }
30617        __struct.hw_version_major = buf.get_u8();
30618        __struct.hw_version_minor = buf.get_u8();
30619        for v in &mut __struct.hw_unique_id {
30620            let val = buf.get_u8();
30621            *v = val;
30622        }
30623        __struct.sw_version_major = buf.get_u8();
30624        __struct.sw_version_minor = buf.get_u8();
30625        Ok(__struct)
30626    }
30627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30628        let mut __tmp = BytesMut::new(bytes);
30629        #[allow(clippy::absurd_extreme_comparisons)]
30630        #[allow(unused_comparisons)]
30631        if __tmp.remaining() < Self::ENCODED_LEN {
30632            panic!(
30633                "buffer is too small (need {} bytes, but got {})",
30634                Self::ENCODED_LEN,
30635                __tmp.remaining(),
30636            )
30637        }
30638        __tmp.put_u64_le(self.time_usec);
30639        __tmp.put_u32_le(self.uptime_sec);
30640        __tmp.put_u32_le(self.sw_vcs_commit);
30641        for val in &self.name {
30642            __tmp.put_u8(*val);
30643        }
30644        __tmp.put_u8(self.hw_version_major);
30645        __tmp.put_u8(self.hw_version_minor);
30646        for val in &self.hw_unique_id {
30647            __tmp.put_u8(*val);
30648        }
30649        __tmp.put_u8(self.sw_version_major);
30650        __tmp.put_u8(self.sw_version_minor);
30651        if matches!(version, MavlinkVersion::V2) {
30652            let len = __tmp.len();
30653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30654        } else {
30655            __tmp.len()
30656        }
30657    }
30658}
30659#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30660#[doc = ""]
30661#[doc = "ID: 310"]
30662#[derive(Debug, Clone, PartialEq)]
30663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30665#[cfg_attr(feature = "ts", derive(TS))]
30666#[cfg_attr(feature = "ts", ts(export))]
30667pub struct UAVCAN_NODE_STATUS_DATA {
30668    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30669    pub time_usec: u64,
30670    #[doc = "Time since the start-up of the node."]
30671    pub uptime_sec: u32,
30672    #[doc = "Vendor-specific status information."]
30673    pub vendor_specific_status_code: u16,
30674    #[doc = "Generalized node health status."]
30675    pub health: UavcanNodeHealth,
30676    #[doc = "Generalized operating mode."]
30677    pub mode: UavcanNodeMode,
30678    #[doc = "Not used currently."]
30679    pub sub_mode: u8,
30680}
30681impl UAVCAN_NODE_STATUS_DATA {
30682    pub const ENCODED_LEN: usize = 17usize;
30683    pub const DEFAULT: Self = Self {
30684        time_usec: 0_u64,
30685        uptime_sec: 0_u32,
30686        vendor_specific_status_code: 0_u16,
30687        health: UavcanNodeHealth::DEFAULT,
30688        mode: UavcanNodeMode::DEFAULT,
30689        sub_mode: 0_u8,
30690    };
30691    #[cfg(feature = "arbitrary")]
30692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30693        use arbitrary::{Arbitrary, Unstructured};
30694        let mut buf = [0u8; 1024];
30695        rng.fill_bytes(&mut buf);
30696        let mut unstructured = Unstructured::new(&buf);
30697        Self::arbitrary(&mut unstructured).unwrap_or_default()
30698    }
30699}
30700impl Default for UAVCAN_NODE_STATUS_DATA {
30701    fn default() -> Self {
30702        Self::DEFAULT.clone()
30703    }
30704}
30705impl MessageData for UAVCAN_NODE_STATUS_DATA {
30706    type Message = MavMessage;
30707    const ID: u32 = 310u32;
30708    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30709    const EXTRA_CRC: u8 = 28u8;
30710    const ENCODED_LEN: usize = 17usize;
30711    fn deser(
30712        _version: MavlinkVersion,
30713        __input: &[u8],
30714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30715        let avail_len = __input.len();
30716        let mut payload_buf = [0; Self::ENCODED_LEN];
30717        let mut buf = if avail_len < Self::ENCODED_LEN {
30718            payload_buf[0..avail_len].copy_from_slice(__input);
30719            Bytes::new(&payload_buf)
30720        } else {
30721            Bytes::new(__input)
30722        };
30723        let mut __struct = Self::default();
30724        __struct.time_usec = buf.get_u64_le();
30725        __struct.uptime_sec = buf.get_u32_le();
30726        __struct.vendor_specific_status_code = buf.get_u16_le();
30727        let tmp = buf.get_u8();
30728        __struct.health =
30729            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30730                enum_type: "UavcanNodeHealth",
30731                value: tmp as u32,
30732            })?;
30733        let tmp = buf.get_u8();
30734        __struct.mode =
30735            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30736                enum_type: "UavcanNodeMode",
30737                value: tmp as u32,
30738            })?;
30739        __struct.sub_mode = buf.get_u8();
30740        Ok(__struct)
30741    }
30742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30743        let mut __tmp = BytesMut::new(bytes);
30744        #[allow(clippy::absurd_extreme_comparisons)]
30745        #[allow(unused_comparisons)]
30746        if __tmp.remaining() < Self::ENCODED_LEN {
30747            panic!(
30748                "buffer is too small (need {} bytes, but got {})",
30749                Self::ENCODED_LEN,
30750                __tmp.remaining(),
30751            )
30752        }
30753        __tmp.put_u64_le(self.time_usec);
30754        __tmp.put_u32_le(self.uptime_sec);
30755        __tmp.put_u16_le(self.vendor_specific_status_code);
30756        __tmp.put_u8(self.health as u8);
30757        __tmp.put_u8(self.mode as u8);
30758        __tmp.put_u8(self.sub_mode);
30759        if matches!(version, MavlinkVersion::V2) {
30760            let len = __tmp.len();
30761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30762        } else {
30763            __tmp.len()
30764        }
30765    }
30766}
30767#[doc = "Request messages."]
30768#[doc = ""]
30769#[doc = "ID: 10006"]
30770#[derive(Debug, Clone, PartialEq)]
30771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30773#[cfg_attr(feature = "ts", derive(TS))]
30774#[cfg_attr(feature = "ts", ts(export))]
30775pub struct UAVIONIX_ADSB_GET_DATA {
30776    #[doc = "Message ID to request. Supports any message in this 10000-10099 range"]
30777    pub ReqMessageId: u32,
30778}
30779impl UAVIONIX_ADSB_GET_DATA {
30780    pub const ENCODED_LEN: usize = 4usize;
30781    pub const DEFAULT: Self = Self {
30782        ReqMessageId: 0_u32,
30783    };
30784    #[cfg(feature = "arbitrary")]
30785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30786        use arbitrary::{Arbitrary, Unstructured};
30787        let mut buf = [0u8; 1024];
30788        rng.fill_bytes(&mut buf);
30789        let mut unstructured = Unstructured::new(&buf);
30790        Self::arbitrary(&mut unstructured).unwrap_or_default()
30791    }
30792}
30793impl Default for UAVIONIX_ADSB_GET_DATA {
30794    fn default() -> Self {
30795        Self::DEFAULT.clone()
30796    }
30797}
30798impl MessageData for UAVIONIX_ADSB_GET_DATA {
30799    type Message = MavMessage;
30800    const ID: u32 = 10006u32;
30801    const NAME: &'static str = "UAVIONIX_ADSB_GET";
30802    const EXTRA_CRC: u8 = 193u8;
30803    const ENCODED_LEN: usize = 4usize;
30804    fn deser(
30805        _version: MavlinkVersion,
30806        __input: &[u8],
30807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30808        let avail_len = __input.len();
30809        let mut payload_buf = [0; Self::ENCODED_LEN];
30810        let mut buf = if avail_len < Self::ENCODED_LEN {
30811            payload_buf[0..avail_len].copy_from_slice(__input);
30812            Bytes::new(&payload_buf)
30813        } else {
30814            Bytes::new(__input)
30815        };
30816        let mut __struct = Self::default();
30817        __struct.ReqMessageId = buf.get_u32_le();
30818        Ok(__struct)
30819    }
30820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30821        let mut __tmp = BytesMut::new(bytes);
30822        #[allow(clippy::absurd_extreme_comparisons)]
30823        #[allow(unused_comparisons)]
30824        if __tmp.remaining() < Self::ENCODED_LEN {
30825            panic!(
30826                "buffer is too small (need {} bytes, but got {})",
30827                Self::ENCODED_LEN,
30828                __tmp.remaining(),
30829            )
30830        }
30831        __tmp.put_u32_le(self.ReqMessageId);
30832        if matches!(version, MavlinkVersion::V2) {
30833            let len = __tmp.len();
30834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30835        } else {
30836            __tmp.len()
30837        }
30838    }
30839}
30840#[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
30841#[doc = ""]
30842#[doc = "ID: 10001"]
30843#[derive(Debug, Clone, PartialEq)]
30844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30846#[cfg_attr(feature = "ts", derive(TS))]
30847#[cfg_attr(feature = "ts", ts(export))]
30848pub struct UAVIONIX_ADSB_OUT_CFG_DATA {
30849    #[doc = "Vehicle address (24 bit)"]
30850    pub ICAO: u32,
30851    #[doc = "Aircraft stall speed in cm/s"]
30852    pub stallSpeed: u16,
30853    #[doc = "Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, \" \" only)"]
30854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30856    pub callsign: [u8; 9],
30857    #[doc = "Transmitting vehicle type. See ADSB_EMITTER_TYPE enum"]
30858    pub emitterType: AdsbEmitterType,
30859    #[doc = "Aircraft length and width encoding (table 2-35 of DO-282B)"]
30860    pub aircraftSize: UavionixAdsbOutCfgAircraftSize,
30861    #[doc = "GPS antenna lateral offset (table 2-36 of DO-282B)"]
30862    pub gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat,
30863    #[doc = "GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)"]
30864    pub gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon,
30865    #[doc = "ADS-B transponder reciever and transmit enable flags"]
30866    pub rfSelect: UavionixAdsbOutRfSelect,
30867}
30868impl UAVIONIX_ADSB_OUT_CFG_DATA {
30869    pub const ENCODED_LEN: usize = 20usize;
30870    pub const DEFAULT: Self = Self {
30871        ICAO: 0_u32,
30872        stallSpeed: 0_u16,
30873        callsign: [0_u8; 9usize],
30874        emitterType: AdsbEmitterType::DEFAULT,
30875        aircraftSize: UavionixAdsbOutCfgAircraftSize::DEFAULT,
30876        gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat::DEFAULT,
30877        gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon::DEFAULT,
30878        rfSelect: UavionixAdsbOutRfSelect::DEFAULT,
30879    };
30880    #[cfg(feature = "arbitrary")]
30881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30882        use arbitrary::{Arbitrary, Unstructured};
30883        let mut buf = [0u8; 1024];
30884        rng.fill_bytes(&mut buf);
30885        let mut unstructured = Unstructured::new(&buf);
30886        Self::arbitrary(&mut unstructured).unwrap_or_default()
30887    }
30888}
30889impl Default for UAVIONIX_ADSB_OUT_CFG_DATA {
30890    fn default() -> Self {
30891        Self::DEFAULT.clone()
30892    }
30893}
30894impl MessageData for UAVIONIX_ADSB_OUT_CFG_DATA {
30895    type Message = MavMessage;
30896    const ID: u32 = 10001u32;
30897    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG";
30898    const EXTRA_CRC: u8 = 209u8;
30899    const ENCODED_LEN: usize = 20usize;
30900    fn deser(
30901        _version: MavlinkVersion,
30902        __input: &[u8],
30903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30904        let avail_len = __input.len();
30905        let mut payload_buf = [0; Self::ENCODED_LEN];
30906        let mut buf = if avail_len < Self::ENCODED_LEN {
30907            payload_buf[0..avail_len].copy_from_slice(__input);
30908            Bytes::new(&payload_buf)
30909        } else {
30910            Bytes::new(__input)
30911        };
30912        let mut __struct = Self::default();
30913        __struct.ICAO = buf.get_u32_le();
30914        __struct.stallSpeed = buf.get_u16_le();
30915        for v in &mut __struct.callsign {
30916            let val = buf.get_u8();
30917            *v = val;
30918        }
30919        let tmp = buf.get_u8();
30920        __struct.emitterType =
30921            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30922                enum_type: "AdsbEmitterType",
30923                value: tmp as u32,
30924            })?;
30925        let tmp = buf.get_u8();
30926        __struct.aircraftSize =
30927            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30928                enum_type: "UavionixAdsbOutCfgAircraftSize",
30929                value: tmp as u32,
30930            })?;
30931        let tmp = buf.get_u8();
30932        __struct.gpsOffsetLat =
30933            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30934                enum_type: "UavionixAdsbOutCfgGpsOffsetLat",
30935                value: tmp as u32,
30936            })?;
30937        let tmp = buf.get_u8();
30938        __struct.gpsOffsetLon =
30939            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30940                enum_type: "UavionixAdsbOutCfgGpsOffsetLon",
30941                value: tmp as u32,
30942            })?;
30943        let tmp = buf.get_u8();
30944        __struct.rfSelect = UavionixAdsbOutRfSelect::from_bits(
30945            tmp & UavionixAdsbOutRfSelect::all().bits(),
30946        )
30947        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30948            flag_type: "UavionixAdsbOutRfSelect",
30949            value: tmp as u32,
30950        })?;
30951        Ok(__struct)
30952    }
30953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30954        let mut __tmp = BytesMut::new(bytes);
30955        #[allow(clippy::absurd_extreme_comparisons)]
30956        #[allow(unused_comparisons)]
30957        if __tmp.remaining() < Self::ENCODED_LEN {
30958            panic!(
30959                "buffer is too small (need {} bytes, but got {})",
30960                Self::ENCODED_LEN,
30961                __tmp.remaining(),
30962            )
30963        }
30964        __tmp.put_u32_le(self.ICAO);
30965        __tmp.put_u16_le(self.stallSpeed);
30966        for val in &self.callsign {
30967            __tmp.put_u8(*val);
30968        }
30969        __tmp.put_u8(self.emitterType as u8);
30970        __tmp.put_u8(self.aircraftSize as u8);
30971        __tmp.put_u8(self.gpsOffsetLat as u8);
30972        __tmp.put_u8(self.gpsOffsetLon as u8);
30973        __tmp.put_u8(self.rfSelect.bits());
30974        if matches!(version, MavlinkVersion::V2) {
30975            let len = __tmp.len();
30976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30977        } else {
30978            __tmp.len()
30979        }
30980    }
30981}
30982#[doc = "Flight Identification for ADSB-Out vehicles."]
30983#[doc = ""]
30984#[doc = "ID: 10005"]
30985#[derive(Debug, Clone, PartialEq)]
30986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30988#[cfg_attr(feature = "ts", derive(TS))]
30989#[cfg_attr(feature = "ts", ts(export))]
30990pub struct UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
30991    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated."]
30992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30994    pub flight_id: [u8; 9],
30995}
30996impl UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
30997    pub const ENCODED_LEN: usize = 9usize;
30998    pub const DEFAULT: Self = Self {
30999        flight_id: [0_u8; 9usize],
31000    };
31001    #[cfg(feature = "arbitrary")]
31002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31003        use arbitrary::{Arbitrary, Unstructured};
31004        let mut buf = [0u8; 1024];
31005        rng.fill_bytes(&mut buf);
31006        let mut unstructured = Unstructured::new(&buf);
31007        Self::arbitrary(&mut unstructured).unwrap_or_default()
31008    }
31009}
31010impl Default for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
31011    fn default() -> Self {
31012        Self::DEFAULT.clone()
31013    }
31014}
31015impl MessageData for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
31016    type Message = MavMessage;
31017    const ID: u32 = 10005u32;
31018    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_FLIGHTID";
31019    const EXTRA_CRC: u8 = 103u8;
31020    const ENCODED_LEN: usize = 9usize;
31021    fn deser(
31022        _version: MavlinkVersion,
31023        __input: &[u8],
31024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31025        let avail_len = __input.len();
31026        let mut payload_buf = [0; Self::ENCODED_LEN];
31027        let mut buf = if avail_len < Self::ENCODED_LEN {
31028            payload_buf[0..avail_len].copy_from_slice(__input);
31029            Bytes::new(&payload_buf)
31030        } else {
31031            Bytes::new(__input)
31032        };
31033        let mut __struct = Self::default();
31034        for v in &mut __struct.flight_id {
31035            let val = buf.get_u8();
31036            *v = val;
31037        }
31038        Ok(__struct)
31039    }
31040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31041        let mut __tmp = BytesMut::new(bytes);
31042        #[allow(clippy::absurd_extreme_comparisons)]
31043        #[allow(unused_comparisons)]
31044        if __tmp.remaining() < Self::ENCODED_LEN {
31045            panic!(
31046                "buffer is too small (need {} bytes, but got {})",
31047                Self::ENCODED_LEN,
31048                __tmp.remaining(),
31049            )
31050        }
31051        for val in &self.flight_id {
31052            __tmp.put_u8(*val);
31053        }
31054        if matches!(version, MavlinkVersion::V2) {
31055            let len = __tmp.len();
31056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31057        } else {
31058            __tmp.len()
31059        }
31060    }
31061}
31062#[doc = "Aircraft Registration."]
31063#[doc = ""]
31064#[doc = "ID: 10004"]
31065#[derive(Debug, Clone, PartialEq)]
31066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31068#[cfg_attr(feature = "ts", derive(TS))]
31069#[cfg_attr(feature = "ts", ts(export))]
31070pub struct UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31071    #[doc = "Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. \"N8644B \". Trailing spaces (0x20) only. This is null-terminated."]
31072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31073    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31074    pub registration: [u8; 9],
31075}
31076impl UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31077    pub const ENCODED_LEN: usize = 9usize;
31078    pub const DEFAULT: Self = Self {
31079        registration: [0_u8; 9usize],
31080    };
31081    #[cfg(feature = "arbitrary")]
31082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31083        use arbitrary::{Arbitrary, Unstructured};
31084        let mut buf = [0u8; 1024];
31085        rng.fill_bytes(&mut buf);
31086        let mut unstructured = Unstructured::new(&buf);
31087        Self::arbitrary(&mut unstructured).unwrap_or_default()
31088    }
31089}
31090impl Default for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31091    fn default() -> Self {
31092        Self::DEFAULT.clone()
31093    }
31094}
31095impl MessageData for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31096    type Message = MavMessage;
31097    const ID: u32 = 10004u32;
31098    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_REGISTRATION";
31099    const EXTRA_CRC: u8 = 133u8;
31100    const ENCODED_LEN: usize = 9usize;
31101    fn deser(
31102        _version: MavlinkVersion,
31103        __input: &[u8],
31104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31105        let avail_len = __input.len();
31106        let mut payload_buf = [0; Self::ENCODED_LEN];
31107        let mut buf = if avail_len < Self::ENCODED_LEN {
31108            payload_buf[0..avail_len].copy_from_slice(__input);
31109            Bytes::new(&payload_buf)
31110        } else {
31111            Bytes::new(__input)
31112        };
31113        let mut __struct = Self::default();
31114        for v in &mut __struct.registration {
31115            let val = buf.get_u8();
31116            *v = val;
31117        }
31118        Ok(__struct)
31119    }
31120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31121        let mut __tmp = BytesMut::new(bytes);
31122        #[allow(clippy::absurd_extreme_comparisons)]
31123        #[allow(unused_comparisons)]
31124        if __tmp.remaining() < Self::ENCODED_LEN {
31125            panic!(
31126                "buffer is too small (need {} bytes, but got {})",
31127                Self::ENCODED_LEN,
31128                __tmp.remaining(),
31129            )
31130        }
31131        for val in &self.registration {
31132            __tmp.put_u8(*val);
31133        }
31134        if matches!(version, MavlinkVersion::V2) {
31135            let len = __tmp.len();
31136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31137        } else {
31138            __tmp.len()
31139        }
31140    }
31141}
31142#[doc = "Control message with all data sent in UCP control message."]
31143#[doc = ""]
31144#[doc = "ID: 10007"]
31145#[derive(Debug, Clone, PartialEq)]
31146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31148#[cfg_attr(feature = "ts", derive(TS))]
31149#[cfg_attr(feature = "ts", ts(export))]
31150pub struct UAVIONIX_ADSB_OUT_CONTROL_DATA {
31151    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
31152    pub baroAltMSL: i32,
31153    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31154    pub squawk: u16,
31155    #[doc = "ADS-B transponder control state flags"]
31156    pub state: UavionixAdsbOutControlState,
31157    #[doc = "Emergency status"]
31158    pub emergencyStatus: UavionixAdsbEmergencyStatus,
31159    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
31160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31162    pub flight_id: [u8; 8],
31163    #[doc = "X-Bit enable (military transponders only)"]
31164    pub x_bit: UavionixAdsbXbit,
31165}
31166impl UAVIONIX_ADSB_OUT_CONTROL_DATA {
31167    pub const ENCODED_LEN: usize = 17usize;
31168    pub const DEFAULT: Self = Self {
31169        baroAltMSL: 0_i32,
31170        squawk: 0_u16,
31171        state: UavionixAdsbOutControlState::DEFAULT,
31172        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
31173        flight_id: [0_u8; 8usize],
31174        x_bit: UavionixAdsbXbit::DEFAULT,
31175    };
31176    #[cfg(feature = "arbitrary")]
31177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31178        use arbitrary::{Arbitrary, Unstructured};
31179        let mut buf = [0u8; 1024];
31180        rng.fill_bytes(&mut buf);
31181        let mut unstructured = Unstructured::new(&buf);
31182        Self::arbitrary(&mut unstructured).unwrap_or_default()
31183    }
31184}
31185impl Default for UAVIONIX_ADSB_OUT_CONTROL_DATA {
31186    fn default() -> Self {
31187        Self::DEFAULT.clone()
31188    }
31189}
31190impl MessageData for UAVIONIX_ADSB_OUT_CONTROL_DATA {
31191    type Message = MavMessage;
31192    const ID: u32 = 10007u32;
31193    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CONTROL";
31194    const EXTRA_CRC: u8 = 71u8;
31195    const ENCODED_LEN: usize = 17usize;
31196    fn deser(
31197        _version: MavlinkVersion,
31198        __input: &[u8],
31199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31200        let avail_len = __input.len();
31201        let mut payload_buf = [0; Self::ENCODED_LEN];
31202        let mut buf = if avail_len < Self::ENCODED_LEN {
31203            payload_buf[0..avail_len].copy_from_slice(__input);
31204            Bytes::new(&payload_buf)
31205        } else {
31206            Bytes::new(__input)
31207        };
31208        let mut __struct = Self::default();
31209        __struct.baroAltMSL = buf.get_i32_le();
31210        __struct.squawk = buf.get_u16_le();
31211        let tmp = buf.get_u8();
31212        __struct.state =
31213            UavionixAdsbOutControlState::from_bits(tmp & UavionixAdsbOutControlState::all().bits())
31214                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31215                    flag_type: "UavionixAdsbOutControlState",
31216                    value: tmp as u32,
31217                })?;
31218        let tmp = buf.get_u8();
31219        __struct.emergencyStatus =
31220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31221                enum_type: "UavionixAdsbEmergencyStatus",
31222                value: tmp as u32,
31223            })?;
31224        for v in &mut __struct.flight_id {
31225            let val = buf.get_u8();
31226            *v = val;
31227        }
31228        let tmp = buf.get_u8();
31229        __struct.x_bit = UavionixAdsbXbit::from_bits(tmp & UavionixAdsbXbit::all().bits()).ok_or(
31230            ::mavlink_core::error::ParserError::InvalidFlag {
31231                flag_type: "UavionixAdsbXbit",
31232                value: tmp as u32,
31233            },
31234        )?;
31235        Ok(__struct)
31236    }
31237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31238        let mut __tmp = BytesMut::new(bytes);
31239        #[allow(clippy::absurd_extreme_comparisons)]
31240        #[allow(unused_comparisons)]
31241        if __tmp.remaining() < Self::ENCODED_LEN {
31242            panic!(
31243                "buffer is too small (need {} bytes, but got {})",
31244                Self::ENCODED_LEN,
31245                __tmp.remaining(),
31246            )
31247        }
31248        __tmp.put_i32_le(self.baroAltMSL);
31249        __tmp.put_u16_le(self.squawk);
31250        __tmp.put_u8(self.state.bits());
31251        __tmp.put_u8(self.emergencyStatus as u8);
31252        for val in &self.flight_id {
31253            __tmp.put_u8(*val);
31254        }
31255        __tmp.put_u8(self.x_bit.bits());
31256        if matches!(version, MavlinkVersion::V2) {
31257            let len = __tmp.len();
31258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31259        } else {
31260            __tmp.len()
31261        }
31262    }
31263}
31264#[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
31265#[doc = ""]
31266#[doc = "ID: 10002"]
31267#[derive(Debug, Clone, PartialEq)]
31268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31270#[cfg_attr(feature = "ts", derive(TS))]
31271#[cfg_attr(feature = "ts", ts(export))]
31272pub struct UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31273    #[doc = "UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX"]
31274    pub utcTime: u32,
31275    #[doc = "Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
31276    pub gpsLat: i32,
31277    #[doc = "Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
31278    pub gpsLon: i32,
31279    #[doc = "Altitude (WGS84). UP +ve. If unknown set to INT32_MAX"]
31280    pub gpsAlt: i32,
31281    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
31282    pub baroAltMSL: i32,
31283    #[doc = "Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX"]
31284    pub accuracyHor: u32,
31285    #[doc = "Vertical accuracy in cm. If unknown set to UINT16_MAX"]
31286    pub accuracyVert: u16,
31287    #[doc = "Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX"]
31288    pub accuracyVel: u16,
31289    #[doc = "GPS vertical speed in cm/s. If unknown set to INT16_MAX"]
31290    pub velVert: i16,
31291    #[doc = "North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX"]
31292    pub velNS: i16,
31293    #[doc = "East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX"]
31294    pub VelEW: i16,
31295    #[doc = "ADS-B transponder dynamic input state flags"]
31296    pub state: UavionixAdsbOutDynamicState,
31297    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31298    pub squawk: u16,
31299    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK"]
31300    pub gpsFix: UavionixAdsbOutDynamicGpsFix,
31301    #[doc = "Number of satellites visible. If unknown set to UINT8_MAX"]
31302    pub numSats: u8,
31303    #[doc = "Emergency status"]
31304    pub emergencyStatus: UavionixAdsbEmergencyStatus,
31305}
31306impl UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31307    pub const ENCODED_LEN: usize = 41usize;
31308    pub const DEFAULT: Self = Self {
31309        utcTime: 0_u32,
31310        gpsLat: 0_i32,
31311        gpsLon: 0_i32,
31312        gpsAlt: 0_i32,
31313        baroAltMSL: 0_i32,
31314        accuracyHor: 0_u32,
31315        accuracyVert: 0_u16,
31316        accuracyVel: 0_u16,
31317        velVert: 0_i16,
31318        velNS: 0_i16,
31319        VelEW: 0_i16,
31320        state: UavionixAdsbOutDynamicState::DEFAULT,
31321        squawk: 0_u16,
31322        gpsFix: UavionixAdsbOutDynamicGpsFix::DEFAULT,
31323        numSats: 0_u8,
31324        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
31325    };
31326    #[cfg(feature = "arbitrary")]
31327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31328        use arbitrary::{Arbitrary, Unstructured};
31329        let mut buf = [0u8; 1024];
31330        rng.fill_bytes(&mut buf);
31331        let mut unstructured = Unstructured::new(&buf);
31332        Self::arbitrary(&mut unstructured).unwrap_or_default()
31333    }
31334}
31335impl Default for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31336    fn default() -> Self {
31337        Self::DEFAULT.clone()
31338    }
31339}
31340impl MessageData for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31341    type Message = MavMessage;
31342    const ID: u32 = 10002u32;
31343    const NAME: &'static str = "UAVIONIX_ADSB_OUT_DYNAMIC";
31344    const EXTRA_CRC: u8 = 186u8;
31345    const ENCODED_LEN: usize = 41usize;
31346    fn deser(
31347        _version: MavlinkVersion,
31348        __input: &[u8],
31349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31350        let avail_len = __input.len();
31351        let mut payload_buf = [0; Self::ENCODED_LEN];
31352        let mut buf = if avail_len < Self::ENCODED_LEN {
31353            payload_buf[0..avail_len].copy_from_slice(__input);
31354            Bytes::new(&payload_buf)
31355        } else {
31356            Bytes::new(__input)
31357        };
31358        let mut __struct = Self::default();
31359        __struct.utcTime = buf.get_u32_le();
31360        __struct.gpsLat = buf.get_i32_le();
31361        __struct.gpsLon = buf.get_i32_le();
31362        __struct.gpsAlt = buf.get_i32_le();
31363        __struct.baroAltMSL = buf.get_i32_le();
31364        __struct.accuracyHor = buf.get_u32_le();
31365        __struct.accuracyVert = buf.get_u16_le();
31366        __struct.accuracyVel = buf.get_u16_le();
31367        __struct.velVert = buf.get_i16_le();
31368        __struct.velNS = buf.get_i16_le();
31369        __struct.VelEW = buf.get_i16_le();
31370        let tmp = buf.get_u16_le();
31371        __struct.state =
31372            UavionixAdsbOutDynamicState::from_bits(tmp & UavionixAdsbOutDynamicState::all().bits())
31373                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31374                    flag_type: "UavionixAdsbOutDynamicState",
31375                    value: tmp as u32,
31376                })?;
31377        __struct.squawk = buf.get_u16_le();
31378        let tmp = buf.get_u8();
31379        __struct.gpsFix =
31380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31381                enum_type: "UavionixAdsbOutDynamicGpsFix",
31382                value: tmp as u32,
31383            })?;
31384        __struct.numSats = buf.get_u8();
31385        let tmp = buf.get_u8();
31386        __struct.emergencyStatus =
31387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31388                enum_type: "UavionixAdsbEmergencyStatus",
31389                value: tmp as u32,
31390            })?;
31391        Ok(__struct)
31392    }
31393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31394        let mut __tmp = BytesMut::new(bytes);
31395        #[allow(clippy::absurd_extreme_comparisons)]
31396        #[allow(unused_comparisons)]
31397        if __tmp.remaining() < Self::ENCODED_LEN {
31398            panic!(
31399                "buffer is too small (need {} bytes, but got {})",
31400                Self::ENCODED_LEN,
31401                __tmp.remaining(),
31402            )
31403        }
31404        __tmp.put_u32_le(self.utcTime);
31405        __tmp.put_i32_le(self.gpsLat);
31406        __tmp.put_i32_le(self.gpsLon);
31407        __tmp.put_i32_le(self.gpsAlt);
31408        __tmp.put_i32_le(self.baroAltMSL);
31409        __tmp.put_u32_le(self.accuracyHor);
31410        __tmp.put_u16_le(self.accuracyVert);
31411        __tmp.put_u16_le(self.accuracyVel);
31412        __tmp.put_i16_le(self.velVert);
31413        __tmp.put_i16_le(self.velNS);
31414        __tmp.put_i16_le(self.VelEW);
31415        __tmp.put_u16_le(self.state.bits());
31416        __tmp.put_u16_le(self.squawk);
31417        __tmp.put_u8(self.gpsFix as u8);
31418        __tmp.put_u8(self.numSats);
31419        __tmp.put_u8(self.emergencyStatus as u8);
31420        if matches!(version, MavlinkVersion::V2) {
31421            let len = __tmp.len();
31422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31423        } else {
31424            __tmp.len()
31425        }
31426    }
31427}
31428#[doc = "Status message with information from UCP Heartbeat and Status messages."]
31429#[doc = ""]
31430#[doc = "ID: 10008"]
31431#[derive(Debug, Clone, PartialEq)]
31432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31434#[cfg_attr(feature = "ts", derive(TS))]
31435#[cfg_attr(feature = "ts", ts(export))]
31436pub struct UAVIONIX_ADSB_OUT_STATUS_DATA {
31437    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31438    pub squawk: u16,
31439    #[doc = "ADS-B transponder status state flags"]
31440    pub state: UavionixAdsbOutStatusState,
31441    #[doc = "Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively"]
31442    pub NIC_NACp: UavionixAdsbOutStatusNicNacp,
31443    #[doc = "Board temperature in C"]
31444    pub boardTemp: u8,
31445    #[doc = "ADS-B transponder fault flags"]
31446    pub fault: UavionixAdsbOutStatusFault,
31447    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
31448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31450    pub flight_id: [u8; 8],
31451}
31452impl UAVIONIX_ADSB_OUT_STATUS_DATA {
31453    pub const ENCODED_LEN: usize = 14usize;
31454    pub const DEFAULT: Self = Self {
31455        squawk: 0_u16,
31456        state: UavionixAdsbOutStatusState::DEFAULT,
31457        NIC_NACp: UavionixAdsbOutStatusNicNacp::DEFAULT,
31458        boardTemp: 0_u8,
31459        fault: UavionixAdsbOutStatusFault::DEFAULT,
31460        flight_id: [0_u8; 8usize],
31461    };
31462    #[cfg(feature = "arbitrary")]
31463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31464        use arbitrary::{Arbitrary, Unstructured};
31465        let mut buf = [0u8; 1024];
31466        rng.fill_bytes(&mut buf);
31467        let mut unstructured = Unstructured::new(&buf);
31468        Self::arbitrary(&mut unstructured).unwrap_or_default()
31469    }
31470}
31471impl Default for UAVIONIX_ADSB_OUT_STATUS_DATA {
31472    fn default() -> Self {
31473        Self::DEFAULT.clone()
31474    }
31475}
31476impl MessageData for UAVIONIX_ADSB_OUT_STATUS_DATA {
31477    type Message = MavMessage;
31478    const ID: u32 = 10008u32;
31479    const NAME: &'static str = "UAVIONIX_ADSB_OUT_STATUS";
31480    const EXTRA_CRC: u8 = 240u8;
31481    const ENCODED_LEN: usize = 14usize;
31482    fn deser(
31483        _version: MavlinkVersion,
31484        __input: &[u8],
31485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31486        let avail_len = __input.len();
31487        let mut payload_buf = [0; Self::ENCODED_LEN];
31488        let mut buf = if avail_len < Self::ENCODED_LEN {
31489            payload_buf[0..avail_len].copy_from_slice(__input);
31490            Bytes::new(&payload_buf)
31491        } else {
31492            Bytes::new(__input)
31493        };
31494        let mut __struct = Self::default();
31495        __struct.squawk = buf.get_u16_le();
31496        let tmp = buf.get_u8();
31497        __struct.state =
31498            UavionixAdsbOutStatusState::from_bits(tmp & UavionixAdsbOutStatusState::all().bits())
31499                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31500                flag_type: "UavionixAdsbOutStatusState",
31501                value: tmp as u32,
31502            })?;
31503        let tmp = buf.get_u8();
31504        __struct.NIC_NACp =
31505            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31506                enum_type: "UavionixAdsbOutStatusNicNacp",
31507                value: tmp as u32,
31508            })?;
31509        __struct.boardTemp = buf.get_u8();
31510        let tmp = buf.get_u8();
31511        __struct.fault =
31512            UavionixAdsbOutStatusFault::from_bits(tmp & UavionixAdsbOutStatusFault::all().bits())
31513                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31514                flag_type: "UavionixAdsbOutStatusFault",
31515                value: tmp as u32,
31516            })?;
31517        for v in &mut __struct.flight_id {
31518            let val = buf.get_u8();
31519            *v = val;
31520        }
31521        Ok(__struct)
31522    }
31523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31524        let mut __tmp = BytesMut::new(bytes);
31525        #[allow(clippy::absurd_extreme_comparisons)]
31526        #[allow(unused_comparisons)]
31527        if __tmp.remaining() < Self::ENCODED_LEN {
31528            panic!(
31529                "buffer is too small (need {} bytes, but got {})",
31530                Self::ENCODED_LEN,
31531                __tmp.remaining(),
31532            )
31533        }
31534        __tmp.put_u16_le(self.squawk);
31535        __tmp.put_u8(self.state.bits());
31536        __tmp.put_u8(self.NIC_NACp as u8);
31537        __tmp.put_u8(self.boardTemp);
31538        __tmp.put_u8(self.fault.bits());
31539        for val in &self.flight_id {
31540            __tmp.put_u8(*val);
31541        }
31542        if matches!(version, MavlinkVersion::V2) {
31543            let len = __tmp.len();
31544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31545        } else {
31546            __tmp.len()
31547        }
31548    }
31549}
31550#[doc = "Transceiver heartbeat with health report (updated every 10s)."]
31551#[doc = ""]
31552#[doc = "ID: 10003"]
31553#[derive(Debug, Clone, PartialEq)]
31554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31556#[cfg_attr(feature = "ts", derive(TS))]
31557#[cfg_attr(feature = "ts", ts(export))]
31558pub struct UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31559    #[doc = "ADS-B transponder messages"]
31560    pub rfHealth: UavionixAdsbRfHealth,
31561}
31562impl UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31563    pub const ENCODED_LEN: usize = 1usize;
31564    pub const DEFAULT: Self = Self {
31565        rfHealth: UavionixAdsbRfHealth::DEFAULT,
31566    };
31567    #[cfg(feature = "arbitrary")]
31568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31569        use arbitrary::{Arbitrary, Unstructured};
31570        let mut buf = [0u8; 1024];
31571        rng.fill_bytes(&mut buf);
31572        let mut unstructured = Unstructured::new(&buf);
31573        Self::arbitrary(&mut unstructured).unwrap_or_default()
31574    }
31575}
31576impl Default for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31577    fn default() -> Self {
31578        Self::DEFAULT.clone()
31579    }
31580}
31581impl MessageData for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31582    type Message = MavMessage;
31583    const ID: u32 = 10003u32;
31584    const NAME: &'static str = "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT";
31585    const EXTRA_CRC: u8 = 4u8;
31586    const ENCODED_LEN: usize = 1usize;
31587    fn deser(
31588        _version: MavlinkVersion,
31589        __input: &[u8],
31590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31591        let avail_len = __input.len();
31592        let mut payload_buf = [0; Self::ENCODED_LEN];
31593        let mut buf = if avail_len < Self::ENCODED_LEN {
31594            payload_buf[0..avail_len].copy_from_slice(__input);
31595            Bytes::new(&payload_buf)
31596        } else {
31597            Bytes::new(__input)
31598        };
31599        let mut __struct = Self::default();
31600        let tmp = buf.get_u8();
31601        __struct.rfHealth = UavionixAdsbRfHealth::from_bits(
31602            tmp & UavionixAdsbRfHealth::all().bits(),
31603        )
31604        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31605            flag_type: "UavionixAdsbRfHealth",
31606            value: tmp as u32,
31607        })?;
31608        Ok(__struct)
31609    }
31610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31611        let mut __tmp = BytesMut::new(bytes);
31612        #[allow(clippy::absurd_extreme_comparisons)]
31613        #[allow(unused_comparisons)]
31614        if __tmp.remaining() < Self::ENCODED_LEN {
31615            panic!(
31616                "buffer is too small (need {} bytes, but got {})",
31617                Self::ENCODED_LEN,
31618                __tmp.remaining(),
31619            )
31620        }
31621        __tmp.put_u8(self.rfHealth.bits());
31622        if matches!(version, MavlinkVersion::V2) {
31623            let len = __tmp.len();
31624            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31625        } else {
31626            __tmp.len()
31627        }
31628    }
31629}
31630#[doc = "The global position resulting from GPS and sensor fusion."]
31631#[doc = ""]
31632#[doc = "ID: 340"]
31633#[derive(Debug, Clone, PartialEq)]
31634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31636#[cfg_attr(feature = "ts", derive(TS))]
31637#[cfg_attr(feature = "ts", ts(export))]
31638pub struct UTM_GLOBAL_POSITION_DATA {
31639    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31640    pub time: u64,
31641    #[doc = "Latitude (WGS84)"]
31642    pub lat: i32,
31643    #[doc = "Longitude (WGS84)"]
31644    pub lon: i32,
31645    #[doc = "Altitude (WGS84)"]
31646    pub alt: i32,
31647    #[doc = "Altitude above ground"]
31648    pub relative_alt: i32,
31649    #[doc = "Next waypoint, latitude (WGS84)"]
31650    pub next_lat: i32,
31651    #[doc = "Next waypoint, longitude (WGS84)"]
31652    pub next_lon: i32,
31653    #[doc = "Next waypoint, altitude (WGS84)"]
31654    pub next_alt: i32,
31655    #[doc = "Ground X speed (latitude, positive north)"]
31656    pub vx: i16,
31657    #[doc = "Ground Y speed (longitude, positive east)"]
31658    pub vy: i16,
31659    #[doc = "Ground Z speed (altitude, positive down)"]
31660    pub vz: i16,
31661    #[doc = "Horizontal position uncertainty (standard deviation)"]
31662    pub h_acc: u16,
31663    #[doc = "Altitude uncertainty (standard deviation)"]
31664    pub v_acc: u16,
31665    #[doc = "Speed uncertainty (standard deviation)"]
31666    pub vel_acc: u16,
31667    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31668    pub update_rate: u16,
31669    #[doc = "Unique UAS ID."]
31670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31671    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31672    pub uas_id: [u8; 18],
31673    #[doc = "Flight state"]
31674    pub flight_state: UtmFlightState,
31675    #[doc = "Bitwise OR combination of the data available flags."]
31676    pub flags: UtmDataAvailFlags,
31677}
31678impl UTM_GLOBAL_POSITION_DATA {
31679    pub const ENCODED_LEN: usize = 70usize;
31680    pub const DEFAULT: Self = Self {
31681        time: 0_u64,
31682        lat: 0_i32,
31683        lon: 0_i32,
31684        alt: 0_i32,
31685        relative_alt: 0_i32,
31686        next_lat: 0_i32,
31687        next_lon: 0_i32,
31688        next_alt: 0_i32,
31689        vx: 0_i16,
31690        vy: 0_i16,
31691        vz: 0_i16,
31692        h_acc: 0_u16,
31693        v_acc: 0_u16,
31694        vel_acc: 0_u16,
31695        update_rate: 0_u16,
31696        uas_id: [0_u8; 18usize],
31697        flight_state: UtmFlightState::DEFAULT,
31698        flags: UtmDataAvailFlags::DEFAULT,
31699    };
31700    #[cfg(feature = "arbitrary")]
31701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31702        use arbitrary::{Arbitrary, Unstructured};
31703        let mut buf = [0u8; 1024];
31704        rng.fill_bytes(&mut buf);
31705        let mut unstructured = Unstructured::new(&buf);
31706        Self::arbitrary(&mut unstructured).unwrap_or_default()
31707    }
31708}
31709impl Default for UTM_GLOBAL_POSITION_DATA {
31710    fn default() -> Self {
31711        Self::DEFAULT.clone()
31712    }
31713}
31714impl MessageData for UTM_GLOBAL_POSITION_DATA {
31715    type Message = MavMessage;
31716    const ID: u32 = 340u32;
31717    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31718    const EXTRA_CRC: u8 = 99u8;
31719    const ENCODED_LEN: usize = 70usize;
31720    fn deser(
31721        _version: MavlinkVersion,
31722        __input: &[u8],
31723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31724        let avail_len = __input.len();
31725        let mut payload_buf = [0; Self::ENCODED_LEN];
31726        let mut buf = if avail_len < Self::ENCODED_LEN {
31727            payload_buf[0..avail_len].copy_from_slice(__input);
31728            Bytes::new(&payload_buf)
31729        } else {
31730            Bytes::new(__input)
31731        };
31732        let mut __struct = Self::default();
31733        __struct.time = buf.get_u64_le();
31734        __struct.lat = buf.get_i32_le();
31735        __struct.lon = buf.get_i32_le();
31736        __struct.alt = buf.get_i32_le();
31737        __struct.relative_alt = buf.get_i32_le();
31738        __struct.next_lat = buf.get_i32_le();
31739        __struct.next_lon = buf.get_i32_le();
31740        __struct.next_alt = buf.get_i32_le();
31741        __struct.vx = buf.get_i16_le();
31742        __struct.vy = buf.get_i16_le();
31743        __struct.vz = buf.get_i16_le();
31744        __struct.h_acc = buf.get_u16_le();
31745        __struct.v_acc = buf.get_u16_le();
31746        __struct.vel_acc = buf.get_u16_le();
31747        __struct.update_rate = buf.get_u16_le();
31748        for v in &mut __struct.uas_id {
31749            let val = buf.get_u8();
31750            *v = val;
31751        }
31752        let tmp = buf.get_u8();
31753        __struct.flight_state =
31754            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31755                enum_type: "UtmFlightState",
31756                value: tmp as u32,
31757            })?;
31758        let tmp = buf.get_u8();
31759        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31760            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31761                flag_type: "UtmDataAvailFlags",
31762                value: tmp as u32,
31763            })?;
31764        Ok(__struct)
31765    }
31766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31767        let mut __tmp = BytesMut::new(bytes);
31768        #[allow(clippy::absurd_extreme_comparisons)]
31769        #[allow(unused_comparisons)]
31770        if __tmp.remaining() < Self::ENCODED_LEN {
31771            panic!(
31772                "buffer is too small (need {} bytes, but got {})",
31773                Self::ENCODED_LEN,
31774                __tmp.remaining(),
31775            )
31776        }
31777        __tmp.put_u64_le(self.time);
31778        __tmp.put_i32_le(self.lat);
31779        __tmp.put_i32_le(self.lon);
31780        __tmp.put_i32_le(self.alt);
31781        __tmp.put_i32_le(self.relative_alt);
31782        __tmp.put_i32_le(self.next_lat);
31783        __tmp.put_i32_le(self.next_lon);
31784        __tmp.put_i32_le(self.next_alt);
31785        __tmp.put_i16_le(self.vx);
31786        __tmp.put_i16_le(self.vy);
31787        __tmp.put_i16_le(self.vz);
31788        __tmp.put_u16_le(self.h_acc);
31789        __tmp.put_u16_le(self.v_acc);
31790        __tmp.put_u16_le(self.vel_acc);
31791        __tmp.put_u16_le(self.update_rate);
31792        for val in &self.uas_id {
31793            __tmp.put_u8(*val);
31794        }
31795        __tmp.put_u8(self.flight_state as u8);
31796        __tmp.put_u8(self.flags.bits());
31797        if matches!(version, MavlinkVersion::V2) {
31798            let len = __tmp.len();
31799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31800        } else {
31801            __tmp.len()
31802        }
31803    }
31804}
31805#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31806#[doc = ""]
31807#[doc = "ID: 248"]
31808#[derive(Debug, Clone, PartialEq)]
31809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31811#[cfg_attr(feature = "ts", derive(TS))]
31812#[cfg_attr(feature = "ts", ts(export))]
31813pub struct V2_EXTENSION_DATA {
31814    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31815    pub message_type: u16,
31816    #[doc = "Network ID (0 for broadcast)"]
31817    pub target_network: u8,
31818    #[doc = "System ID (0 for broadcast)"]
31819    pub target_system: u8,
31820    #[doc = "Component ID (0 for broadcast)"]
31821    pub target_component: u8,
31822    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31825    pub payload: [u8; 249],
31826}
31827impl V2_EXTENSION_DATA {
31828    pub const ENCODED_LEN: usize = 254usize;
31829    pub const DEFAULT: Self = Self {
31830        message_type: 0_u16,
31831        target_network: 0_u8,
31832        target_system: 0_u8,
31833        target_component: 0_u8,
31834        payload: [0_u8; 249usize],
31835    };
31836    #[cfg(feature = "arbitrary")]
31837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31838        use arbitrary::{Arbitrary, Unstructured};
31839        let mut buf = [0u8; 1024];
31840        rng.fill_bytes(&mut buf);
31841        let mut unstructured = Unstructured::new(&buf);
31842        Self::arbitrary(&mut unstructured).unwrap_or_default()
31843    }
31844}
31845impl Default for V2_EXTENSION_DATA {
31846    fn default() -> Self {
31847        Self::DEFAULT.clone()
31848    }
31849}
31850impl MessageData for V2_EXTENSION_DATA {
31851    type Message = MavMessage;
31852    const ID: u32 = 248u32;
31853    const NAME: &'static str = "V2_EXTENSION";
31854    const EXTRA_CRC: u8 = 8u8;
31855    const ENCODED_LEN: usize = 254usize;
31856    fn deser(
31857        _version: MavlinkVersion,
31858        __input: &[u8],
31859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31860        let avail_len = __input.len();
31861        let mut payload_buf = [0; Self::ENCODED_LEN];
31862        let mut buf = if avail_len < Self::ENCODED_LEN {
31863            payload_buf[0..avail_len].copy_from_slice(__input);
31864            Bytes::new(&payload_buf)
31865        } else {
31866            Bytes::new(__input)
31867        };
31868        let mut __struct = Self::default();
31869        __struct.message_type = buf.get_u16_le();
31870        __struct.target_network = buf.get_u8();
31871        __struct.target_system = buf.get_u8();
31872        __struct.target_component = buf.get_u8();
31873        for v in &mut __struct.payload {
31874            let val = buf.get_u8();
31875            *v = val;
31876        }
31877        Ok(__struct)
31878    }
31879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31880        let mut __tmp = BytesMut::new(bytes);
31881        #[allow(clippy::absurd_extreme_comparisons)]
31882        #[allow(unused_comparisons)]
31883        if __tmp.remaining() < Self::ENCODED_LEN {
31884            panic!(
31885                "buffer is too small (need {} bytes, but got {})",
31886                Self::ENCODED_LEN,
31887                __tmp.remaining(),
31888            )
31889        }
31890        __tmp.put_u16_le(self.message_type);
31891        __tmp.put_u8(self.target_network);
31892        __tmp.put_u8(self.target_system);
31893        __tmp.put_u8(self.target_component);
31894        for val in &self.payload {
31895            __tmp.put_u8(*val);
31896        }
31897        if matches!(version, MavlinkVersion::V2) {
31898            let len = __tmp.len();
31899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31900        } else {
31901            __tmp.len()
31902        }
31903    }
31904}
31905#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31906#[doc = ""]
31907#[doc = "ID: 74"]
31908#[derive(Debug, Clone, PartialEq)]
31909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31911#[cfg_attr(feature = "ts", derive(TS))]
31912#[cfg_attr(feature = "ts", ts(export))]
31913pub struct VFR_HUD_DATA {
31914    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31915    pub airspeed: f32,
31916    #[doc = "Current ground speed."]
31917    pub groundspeed: f32,
31918    #[doc = "Current altitude (MSL)."]
31919    pub alt: f32,
31920    #[doc = "Current climb rate."]
31921    pub climb: f32,
31922    #[doc = "Current heading in compass units (0-360, 0=north)."]
31923    pub heading: i16,
31924    #[doc = "Current throttle setting (0 to 100)."]
31925    pub throttle: u16,
31926}
31927impl VFR_HUD_DATA {
31928    pub const ENCODED_LEN: usize = 20usize;
31929    pub const DEFAULT: Self = Self {
31930        airspeed: 0.0_f32,
31931        groundspeed: 0.0_f32,
31932        alt: 0.0_f32,
31933        climb: 0.0_f32,
31934        heading: 0_i16,
31935        throttle: 0_u16,
31936    };
31937    #[cfg(feature = "arbitrary")]
31938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31939        use arbitrary::{Arbitrary, Unstructured};
31940        let mut buf = [0u8; 1024];
31941        rng.fill_bytes(&mut buf);
31942        let mut unstructured = Unstructured::new(&buf);
31943        Self::arbitrary(&mut unstructured).unwrap_or_default()
31944    }
31945}
31946impl Default for VFR_HUD_DATA {
31947    fn default() -> Self {
31948        Self::DEFAULT.clone()
31949    }
31950}
31951impl MessageData for VFR_HUD_DATA {
31952    type Message = MavMessage;
31953    const ID: u32 = 74u32;
31954    const NAME: &'static str = "VFR_HUD";
31955    const EXTRA_CRC: u8 = 20u8;
31956    const ENCODED_LEN: usize = 20usize;
31957    fn deser(
31958        _version: MavlinkVersion,
31959        __input: &[u8],
31960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31961        let avail_len = __input.len();
31962        let mut payload_buf = [0; Self::ENCODED_LEN];
31963        let mut buf = if avail_len < Self::ENCODED_LEN {
31964            payload_buf[0..avail_len].copy_from_slice(__input);
31965            Bytes::new(&payload_buf)
31966        } else {
31967            Bytes::new(__input)
31968        };
31969        let mut __struct = Self::default();
31970        __struct.airspeed = buf.get_f32_le();
31971        __struct.groundspeed = buf.get_f32_le();
31972        __struct.alt = buf.get_f32_le();
31973        __struct.climb = buf.get_f32_le();
31974        __struct.heading = buf.get_i16_le();
31975        __struct.throttle = buf.get_u16_le();
31976        Ok(__struct)
31977    }
31978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31979        let mut __tmp = BytesMut::new(bytes);
31980        #[allow(clippy::absurd_extreme_comparisons)]
31981        #[allow(unused_comparisons)]
31982        if __tmp.remaining() < Self::ENCODED_LEN {
31983            panic!(
31984                "buffer is too small (need {} bytes, but got {})",
31985                Self::ENCODED_LEN,
31986                __tmp.remaining(),
31987            )
31988        }
31989        __tmp.put_f32_le(self.airspeed);
31990        __tmp.put_f32_le(self.groundspeed);
31991        __tmp.put_f32_le(self.alt);
31992        __tmp.put_f32_le(self.climb);
31993        __tmp.put_i16_le(self.heading);
31994        __tmp.put_u16_le(self.throttle);
31995        if matches!(version, MavlinkVersion::V2) {
31996            let len = __tmp.len();
31997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31998        } else {
31999            __tmp.len()
32000        }
32001    }
32002}
32003#[doc = "Vibration levels and accelerometer clipping."]
32004#[doc = ""]
32005#[doc = "ID: 241"]
32006#[derive(Debug, Clone, PartialEq)]
32007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32009#[cfg_attr(feature = "ts", derive(TS))]
32010#[cfg_attr(feature = "ts", ts(export))]
32011pub struct VIBRATION_DATA {
32012    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32013    pub time_usec: u64,
32014    #[doc = "Vibration levels on X-axis"]
32015    pub vibration_x: f32,
32016    #[doc = "Vibration levels on Y-axis"]
32017    pub vibration_y: f32,
32018    #[doc = "Vibration levels on Z-axis"]
32019    pub vibration_z: f32,
32020    #[doc = "first accelerometer clipping count"]
32021    pub clipping_0: u32,
32022    #[doc = "second accelerometer clipping count"]
32023    pub clipping_1: u32,
32024    #[doc = "third accelerometer clipping count"]
32025    pub clipping_2: u32,
32026}
32027impl VIBRATION_DATA {
32028    pub const ENCODED_LEN: usize = 32usize;
32029    pub const DEFAULT: Self = Self {
32030        time_usec: 0_u64,
32031        vibration_x: 0.0_f32,
32032        vibration_y: 0.0_f32,
32033        vibration_z: 0.0_f32,
32034        clipping_0: 0_u32,
32035        clipping_1: 0_u32,
32036        clipping_2: 0_u32,
32037    };
32038    #[cfg(feature = "arbitrary")]
32039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32040        use arbitrary::{Arbitrary, Unstructured};
32041        let mut buf = [0u8; 1024];
32042        rng.fill_bytes(&mut buf);
32043        let mut unstructured = Unstructured::new(&buf);
32044        Self::arbitrary(&mut unstructured).unwrap_or_default()
32045    }
32046}
32047impl Default for VIBRATION_DATA {
32048    fn default() -> Self {
32049        Self::DEFAULT.clone()
32050    }
32051}
32052impl MessageData for VIBRATION_DATA {
32053    type Message = MavMessage;
32054    const ID: u32 = 241u32;
32055    const NAME: &'static str = "VIBRATION";
32056    const EXTRA_CRC: u8 = 90u8;
32057    const ENCODED_LEN: usize = 32usize;
32058    fn deser(
32059        _version: MavlinkVersion,
32060        __input: &[u8],
32061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32062        let avail_len = __input.len();
32063        let mut payload_buf = [0; Self::ENCODED_LEN];
32064        let mut buf = if avail_len < Self::ENCODED_LEN {
32065            payload_buf[0..avail_len].copy_from_slice(__input);
32066            Bytes::new(&payload_buf)
32067        } else {
32068            Bytes::new(__input)
32069        };
32070        let mut __struct = Self::default();
32071        __struct.time_usec = buf.get_u64_le();
32072        __struct.vibration_x = buf.get_f32_le();
32073        __struct.vibration_y = buf.get_f32_le();
32074        __struct.vibration_z = buf.get_f32_le();
32075        __struct.clipping_0 = buf.get_u32_le();
32076        __struct.clipping_1 = buf.get_u32_le();
32077        __struct.clipping_2 = buf.get_u32_le();
32078        Ok(__struct)
32079    }
32080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32081        let mut __tmp = BytesMut::new(bytes);
32082        #[allow(clippy::absurd_extreme_comparisons)]
32083        #[allow(unused_comparisons)]
32084        if __tmp.remaining() < Self::ENCODED_LEN {
32085            panic!(
32086                "buffer is too small (need {} bytes, but got {})",
32087                Self::ENCODED_LEN,
32088                __tmp.remaining(),
32089            )
32090        }
32091        __tmp.put_u64_le(self.time_usec);
32092        __tmp.put_f32_le(self.vibration_x);
32093        __tmp.put_f32_le(self.vibration_y);
32094        __tmp.put_f32_le(self.vibration_z);
32095        __tmp.put_u32_le(self.clipping_0);
32096        __tmp.put_u32_le(self.clipping_1);
32097        __tmp.put_u32_le(self.clipping_2);
32098        if matches!(version, MavlinkVersion::V2) {
32099            let len = __tmp.len();
32100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32101        } else {
32102            __tmp.len()
32103        }
32104    }
32105}
32106#[doc = "Global position estimate from a Vicon motion system source."]
32107#[doc = ""]
32108#[doc = "ID: 104"]
32109#[derive(Debug, Clone, PartialEq)]
32110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32112#[cfg_attr(feature = "ts", derive(TS))]
32113#[cfg_attr(feature = "ts", ts(export))]
32114pub struct VICON_POSITION_ESTIMATE_DATA {
32115    #[doc = "Timestamp (UNIX time or time since system boot)"]
32116    pub usec: u64,
32117    #[doc = "Global X position"]
32118    pub x: f32,
32119    #[doc = "Global Y position"]
32120    pub y: f32,
32121    #[doc = "Global Z position"]
32122    pub z: f32,
32123    #[doc = "Roll angle"]
32124    pub roll: f32,
32125    #[doc = "Pitch angle"]
32126    pub pitch: f32,
32127    #[doc = "Yaw angle"]
32128    pub yaw: f32,
32129    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32132    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32133    pub covariance: [f32; 21],
32134}
32135impl VICON_POSITION_ESTIMATE_DATA {
32136    pub const ENCODED_LEN: usize = 116usize;
32137    pub const DEFAULT: Self = Self {
32138        usec: 0_u64,
32139        x: 0.0_f32,
32140        y: 0.0_f32,
32141        z: 0.0_f32,
32142        roll: 0.0_f32,
32143        pitch: 0.0_f32,
32144        yaw: 0.0_f32,
32145        covariance: [0.0_f32; 21usize],
32146    };
32147    #[cfg(feature = "arbitrary")]
32148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32149        use arbitrary::{Arbitrary, Unstructured};
32150        let mut buf = [0u8; 1024];
32151        rng.fill_bytes(&mut buf);
32152        let mut unstructured = Unstructured::new(&buf);
32153        Self::arbitrary(&mut unstructured).unwrap_or_default()
32154    }
32155}
32156impl Default for VICON_POSITION_ESTIMATE_DATA {
32157    fn default() -> Self {
32158        Self::DEFAULT.clone()
32159    }
32160}
32161impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32162    type Message = MavMessage;
32163    const ID: u32 = 104u32;
32164    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32165    const EXTRA_CRC: u8 = 56u8;
32166    const ENCODED_LEN: usize = 116usize;
32167    fn deser(
32168        _version: MavlinkVersion,
32169        __input: &[u8],
32170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32171        let avail_len = __input.len();
32172        let mut payload_buf = [0; Self::ENCODED_LEN];
32173        let mut buf = if avail_len < Self::ENCODED_LEN {
32174            payload_buf[0..avail_len].copy_from_slice(__input);
32175            Bytes::new(&payload_buf)
32176        } else {
32177            Bytes::new(__input)
32178        };
32179        let mut __struct = Self::default();
32180        __struct.usec = buf.get_u64_le();
32181        __struct.x = buf.get_f32_le();
32182        __struct.y = buf.get_f32_le();
32183        __struct.z = buf.get_f32_le();
32184        __struct.roll = buf.get_f32_le();
32185        __struct.pitch = buf.get_f32_le();
32186        __struct.yaw = buf.get_f32_le();
32187        for v in &mut __struct.covariance {
32188            let val = buf.get_f32_le();
32189            *v = val;
32190        }
32191        Ok(__struct)
32192    }
32193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32194        let mut __tmp = BytesMut::new(bytes);
32195        #[allow(clippy::absurd_extreme_comparisons)]
32196        #[allow(unused_comparisons)]
32197        if __tmp.remaining() < Self::ENCODED_LEN {
32198            panic!(
32199                "buffer is too small (need {} bytes, but got {})",
32200                Self::ENCODED_LEN,
32201                __tmp.remaining(),
32202            )
32203        }
32204        __tmp.put_u64_le(self.usec);
32205        __tmp.put_f32_le(self.x);
32206        __tmp.put_f32_le(self.y);
32207        __tmp.put_f32_le(self.z);
32208        __tmp.put_f32_le(self.roll);
32209        __tmp.put_f32_le(self.pitch);
32210        __tmp.put_f32_le(self.yaw);
32211        if matches!(version, MavlinkVersion::V2) {
32212            for val in &self.covariance {
32213                __tmp.put_f32_le(*val);
32214            }
32215            let len = __tmp.len();
32216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32217        } else {
32218            __tmp.len()
32219        }
32220    }
32221}
32222#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32223#[doc = ""]
32224#[doc = "ID: 269"]
32225#[derive(Debug, Clone, PartialEq)]
32226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32228#[cfg_attr(feature = "ts", derive(TS))]
32229#[cfg_attr(feature = "ts", ts(export))]
32230pub struct VIDEO_STREAM_INFORMATION_DATA {
32231    #[doc = "Frame rate."]
32232    pub framerate: f32,
32233    #[doc = "Bit rate."]
32234    pub bitrate: u32,
32235    #[doc = "Bitmap of stream status flags."]
32236    pub flags: VideoStreamStatusFlags,
32237    #[doc = "Horizontal resolution."]
32238    pub resolution_h: u16,
32239    #[doc = "Vertical resolution."]
32240    pub resolution_v: u16,
32241    #[doc = "Video image rotation clockwise."]
32242    pub rotation: u16,
32243    #[doc = "Horizontal Field of view."]
32244    pub hfov: u16,
32245    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32246    pub stream_id: u8,
32247    #[doc = "Number of streams available."]
32248    pub count: u8,
32249    #[doc = "Type of stream."]
32250    pub mavtype: VideoStreamType,
32251    #[doc = "Stream name."]
32252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32253    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32254    pub name: [u8; 32],
32255    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32257    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32258    pub uri: [u8; 160],
32259    #[doc = "Encoding of stream."]
32260    #[cfg_attr(feature = "serde", serde(default))]
32261    pub encoding: VideoStreamEncoding,
32262    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32264    pub camera_device_id: u8,
32265}
32266impl VIDEO_STREAM_INFORMATION_DATA {
32267    pub const ENCODED_LEN: usize = 215usize;
32268    pub const DEFAULT: Self = Self {
32269        framerate: 0.0_f32,
32270        bitrate: 0_u32,
32271        flags: VideoStreamStatusFlags::DEFAULT,
32272        resolution_h: 0_u16,
32273        resolution_v: 0_u16,
32274        rotation: 0_u16,
32275        hfov: 0_u16,
32276        stream_id: 0_u8,
32277        count: 0_u8,
32278        mavtype: VideoStreamType::DEFAULT,
32279        name: [0_u8; 32usize],
32280        uri: [0_u8; 160usize],
32281        encoding: VideoStreamEncoding::DEFAULT,
32282        camera_device_id: 0_u8,
32283    };
32284    #[cfg(feature = "arbitrary")]
32285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32286        use arbitrary::{Arbitrary, Unstructured};
32287        let mut buf = [0u8; 1024];
32288        rng.fill_bytes(&mut buf);
32289        let mut unstructured = Unstructured::new(&buf);
32290        Self::arbitrary(&mut unstructured).unwrap_or_default()
32291    }
32292}
32293impl Default for VIDEO_STREAM_INFORMATION_DATA {
32294    fn default() -> Self {
32295        Self::DEFAULT.clone()
32296    }
32297}
32298impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32299    type Message = MavMessage;
32300    const ID: u32 = 269u32;
32301    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32302    const EXTRA_CRC: u8 = 109u8;
32303    const ENCODED_LEN: usize = 215usize;
32304    fn deser(
32305        _version: MavlinkVersion,
32306        __input: &[u8],
32307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32308        let avail_len = __input.len();
32309        let mut payload_buf = [0; Self::ENCODED_LEN];
32310        let mut buf = if avail_len < Self::ENCODED_LEN {
32311            payload_buf[0..avail_len].copy_from_slice(__input);
32312            Bytes::new(&payload_buf)
32313        } else {
32314            Bytes::new(__input)
32315        };
32316        let mut __struct = Self::default();
32317        __struct.framerate = buf.get_f32_le();
32318        __struct.bitrate = buf.get_u32_le();
32319        let tmp = buf.get_u16_le();
32320        __struct.flags = VideoStreamStatusFlags::from_bits(
32321            tmp & VideoStreamStatusFlags::all().bits(),
32322        )
32323        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32324            flag_type: "VideoStreamStatusFlags",
32325            value: tmp as u32,
32326        })?;
32327        __struct.resolution_h = buf.get_u16_le();
32328        __struct.resolution_v = buf.get_u16_le();
32329        __struct.rotation = buf.get_u16_le();
32330        __struct.hfov = buf.get_u16_le();
32331        __struct.stream_id = buf.get_u8();
32332        __struct.count = buf.get_u8();
32333        let tmp = buf.get_u8();
32334        __struct.mavtype =
32335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32336                enum_type: "VideoStreamType",
32337                value: tmp as u32,
32338            })?;
32339        for v in &mut __struct.name {
32340            let val = buf.get_u8();
32341            *v = val;
32342        }
32343        for v in &mut __struct.uri {
32344            let val = buf.get_u8();
32345            *v = val;
32346        }
32347        let tmp = buf.get_u8();
32348        __struct.encoding =
32349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32350                enum_type: "VideoStreamEncoding",
32351                value: tmp as u32,
32352            })?;
32353        __struct.camera_device_id = buf.get_u8();
32354        Ok(__struct)
32355    }
32356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32357        let mut __tmp = BytesMut::new(bytes);
32358        #[allow(clippy::absurd_extreme_comparisons)]
32359        #[allow(unused_comparisons)]
32360        if __tmp.remaining() < Self::ENCODED_LEN {
32361            panic!(
32362                "buffer is too small (need {} bytes, but got {})",
32363                Self::ENCODED_LEN,
32364                __tmp.remaining(),
32365            )
32366        }
32367        __tmp.put_f32_le(self.framerate);
32368        __tmp.put_u32_le(self.bitrate);
32369        __tmp.put_u16_le(self.flags.bits());
32370        __tmp.put_u16_le(self.resolution_h);
32371        __tmp.put_u16_le(self.resolution_v);
32372        __tmp.put_u16_le(self.rotation);
32373        __tmp.put_u16_le(self.hfov);
32374        __tmp.put_u8(self.stream_id);
32375        __tmp.put_u8(self.count);
32376        __tmp.put_u8(self.mavtype as u8);
32377        for val in &self.name {
32378            __tmp.put_u8(*val);
32379        }
32380        for val in &self.uri {
32381            __tmp.put_u8(*val);
32382        }
32383        if matches!(version, MavlinkVersion::V2) {
32384            __tmp.put_u8(self.encoding as u8);
32385            __tmp.put_u8(self.camera_device_id);
32386            let len = __tmp.len();
32387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32388        } else {
32389            __tmp.len()
32390        }
32391    }
32392}
32393#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32394#[doc = ""]
32395#[doc = "ID: 270"]
32396#[derive(Debug, Clone, PartialEq)]
32397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32399#[cfg_attr(feature = "ts", derive(TS))]
32400#[cfg_attr(feature = "ts", ts(export))]
32401pub struct VIDEO_STREAM_STATUS_DATA {
32402    #[doc = "Frame rate"]
32403    pub framerate: f32,
32404    #[doc = "Bit rate"]
32405    pub bitrate: u32,
32406    #[doc = "Bitmap of stream status flags"]
32407    pub flags: VideoStreamStatusFlags,
32408    #[doc = "Horizontal resolution"]
32409    pub resolution_h: u16,
32410    #[doc = "Vertical resolution"]
32411    pub resolution_v: u16,
32412    #[doc = "Video image rotation clockwise"]
32413    pub rotation: u16,
32414    #[doc = "Horizontal Field of view"]
32415    pub hfov: u16,
32416    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32417    pub stream_id: u8,
32418    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32420    pub camera_device_id: u8,
32421}
32422impl VIDEO_STREAM_STATUS_DATA {
32423    pub const ENCODED_LEN: usize = 20usize;
32424    pub const DEFAULT: Self = Self {
32425        framerate: 0.0_f32,
32426        bitrate: 0_u32,
32427        flags: VideoStreamStatusFlags::DEFAULT,
32428        resolution_h: 0_u16,
32429        resolution_v: 0_u16,
32430        rotation: 0_u16,
32431        hfov: 0_u16,
32432        stream_id: 0_u8,
32433        camera_device_id: 0_u8,
32434    };
32435    #[cfg(feature = "arbitrary")]
32436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32437        use arbitrary::{Arbitrary, Unstructured};
32438        let mut buf = [0u8; 1024];
32439        rng.fill_bytes(&mut buf);
32440        let mut unstructured = Unstructured::new(&buf);
32441        Self::arbitrary(&mut unstructured).unwrap_or_default()
32442    }
32443}
32444impl Default for VIDEO_STREAM_STATUS_DATA {
32445    fn default() -> Self {
32446        Self::DEFAULT.clone()
32447    }
32448}
32449impl MessageData for VIDEO_STREAM_STATUS_DATA {
32450    type Message = MavMessage;
32451    const ID: u32 = 270u32;
32452    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32453    const EXTRA_CRC: u8 = 59u8;
32454    const ENCODED_LEN: usize = 20usize;
32455    fn deser(
32456        _version: MavlinkVersion,
32457        __input: &[u8],
32458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32459        let avail_len = __input.len();
32460        let mut payload_buf = [0; Self::ENCODED_LEN];
32461        let mut buf = if avail_len < Self::ENCODED_LEN {
32462            payload_buf[0..avail_len].copy_from_slice(__input);
32463            Bytes::new(&payload_buf)
32464        } else {
32465            Bytes::new(__input)
32466        };
32467        let mut __struct = Self::default();
32468        __struct.framerate = buf.get_f32_le();
32469        __struct.bitrate = buf.get_u32_le();
32470        let tmp = buf.get_u16_le();
32471        __struct.flags = VideoStreamStatusFlags::from_bits(
32472            tmp & VideoStreamStatusFlags::all().bits(),
32473        )
32474        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32475            flag_type: "VideoStreamStatusFlags",
32476            value: tmp as u32,
32477        })?;
32478        __struct.resolution_h = buf.get_u16_le();
32479        __struct.resolution_v = buf.get_u16_le();
32480        __struct.rotation = buf.get_u16_le();
32481        __struct.hfov = buf.get_u16_le();
32482        __struct.stream_id = buf.get_u8();
32483        __struct.camera_device_id = buf.get_u8();
32484        Ok(__struct)
32485    }
32486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32487        let mut __tmp = BytesMut::new(bytes);
32488        #[allow(clippy::absurd_extreme_comparisons)]
32489        #[allow(unused_comparisons)]
32490        if __tmp.remaining() < Self::ENCODED_LEN {
32491            panic!(
32492                "buffer is too small (need {} bytes, but got {})",
32493                Self::ENCODED_LEN,
32494                __tmp.remaining(),
32495            )
32496        }
32497        __tmp.put_f32_le(self.framerate);
32498        __tmp.put_u32_le(self.bitrate);
32499        __tmp.put_u16_le(self.flags.bits());
32500        __tmp.put_u16_le(self.resolution_h);
32501        __tmp.put_u16_le(self.resolution_v);
32502        __tmp.put_u16_le(self.rotation);
32503        __tmp.put_u16_le(self.hfov);
32504        __tmp.put_u8(self.stream_id);
32505        if matches!(version, MavlinkVersion::V2) {
32506            __tmp.put_u8(self.camera_device_id);
32507            let len = __tmp.len();
32508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32509        } else {
32510            __tmp.len()
32511        }
32512    }
32513}
32514#[doc = "Local position/attitude estimate from a vision source."]
32515#[doc = ""]
32516#[doc = "ID: 102"]
32517#[derive(Debug, Clone, PartialEq)]
32518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32520#[cfg_attr(feature = "ts", derive(TS))]
32521#[cfg_attr(feature = "ts", ts(export))]
32522pub struct VISION_POSITION_ESTIMATE_DATA {
32523    #[doc = "Timestamp (UNIX time or time since system boot)"]
32524    pub usec: u64,
32525    #[doc = "Local X position"]
32526    pub x: f32,
32527    #[doc = "Local Y position"]
32528    pub y: f32,
32529    #[doc = "Local Z position"]
32530    pub z: f32,
32531    #[doc = "Roll angle"]
32532    pub roll: f32,
32533    #[doc = "Pitch angle"]
32534    pub pitch: f32,
32535    #[doc = "Yaw angle"]
32536    pub yaw: f32,
32537    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32539    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32540    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32541    pub covariance: [f32; 21],
32542    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32544    pub reset_counter: u8,
32545}
32546impl VISION_POSITION_ESTIMATE_DATA {
32547    pub const ENCODED_LEN: usize = 117usize;
32548    pub const DEFAULT: Self = Self {
32549        usec: 0_u64,
32550        x: 0.0_f32,
32551        y: 0.0_f32,
32552        z: 0.0_f32,
32553        roll: 0.0_f32,
32554        pitch: 0.0_f32,
32555        yaw: 0.0_f32,
32556        covariance: [0.0_f32; 21usize],
32557        reset_counter: 0_u8,
32558    };
32559    #[cfg(feature = "arbitrary")]
32560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32561        use arbitrary::{Arbitrary, Unstructured};
32562        let mut buf = [0u8; 1024];
32563        rng.fill_bytes(&mut buf);
32564        let mut unstructured = Unstructured::new(&buf);
32565        Self::arbitrary(&mut unstructured).unwrap_or_default()
32566    }
32567}
32568impl Default for VISION_POSITION_ESTIMATE_DATA {
32569    fn default() -> Self {
32570        Self::DEFAULT.clone()
32571    }
32572}
32573impl MessageData for VISION_POSITION_ESTIMATE_DATA {
32574    type Message = MavMessage;
32575    const ID: u32 = 102u32;
32576    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
32577    const EXTRA_CRC: u8 = 158u8;
32578    const ENCODED_LEN: usize = 117usize;
32579    fn deser(
32580        _version: MavlinkVersion,
32581        __input: &[u8],
32582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32583        let avail_len = __input.len();
32584        let mut payload_buf = [0; Self::ENCODED_LEN];
32585        let mut buf = if avail_len < Self::ENCODED_LEN {
32586            payload_buf[0..avail_len].copy_from_slice(__input);
32587            Bytes::new(&payload_buf)
32588        } else {
32589            Bytes::new(__input)
32590        };
32591        let mut __struct = Self::default();
32592        __struct.usec = buf.get_u64_le();
32593        __struct.x = buf.get_f32_le();
32594        __struct.y = buf.get_f32_le();
32595        __struct.z = buf.get_f32_le();
32596        __struct.roll = buf.get_f32_le();
32597        __struct.pitch = buf.get_f32_le();
32598        __struct.yaw = buf.get_f32_le();
32599        for v in &mut __struct.covariance {
32600            let val = buf.get_f32_le();
32601            *v = val;
32602        }
32603        __struct.reset_counter = buf.get_u8();
32604        Ok(__struct)
32605    }
32606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32607        let mut __tmp = BytesMut::new(bytes);
32608        #[allow(clippy::absurd_extreme_comparisons)]
32609        #[allow(unused_comparisons)]
32610        if __tmp.remaining() < Self::ENCODED_LEN {
32611            panic!(
32612                "buffer is too small (need {} bytes, but got {})",
32613                Self::ENCODED_LEN,
32614                __tmp.remaining(),
32615            )
32616        }
32617        __tmp.put_u64_le(self.usec);
32618        __tmp.put_f32_le(self.x);
32619        __tmp.put_f32_le(self.y);
32620        __tmp.put_f32_le(self.z);
32621        __tmp.put_f32_le(self.roll);
32622        __tmp.put_f32_le(self.pitch);
32623        __tmp.put_f32_le(self.yaw);
32624        if matches!(version, MavlinkVersion::V2) {
32625            for val in &self.covariance {
32626                __tmp.put_f32_le(*val);
32627            }
32628            __tmp.put_u8(self.reset_counter);
32629            let len = __tmp.len();
32630            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32631        } else {
32632            __tmp.len()
32633        }
32634    }
32635}
32636#[doc = "Speed estimate from a vision source."]
32637#[doc = ""]
32638#[doc = "ID: 103"]
32639#[derive(Debug, Clone, PartialEq)]
32640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32642#[cfg_attr(feature = "ts", derive(TS))]
32643#[cfg_attr(feature = "ts", ts(export))]
32644pub struct VISION_SPEED_ESTIMATE_DATA {
32645    #[doc = "Timestamp (UNIX time or time since system boot)"]
32646    pub usec: u64,
32647    #[doc = "Global X speed"]
32648    pub x: f32,
32649    #[doc = "Global Y speed"]
32650    pub y: f32,
32651    #[doc = "Global Z speed"]
32652    pub z: f32,
32653    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32655    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32656    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32657    pub covariance: [f32; 9],
32658    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32660    pub reset_counter: u8,
32661}
32662impl VISION_SPEED_ESTIMATE_DATA {
32663    pub const ENCODED_LEN: usize = 57usize;
32664    pub const DEFAULT: Self = Self {
32665        usec: 0_u64,
32666        x: 0.0_f32,
32667        y: 0.0_f32,
32668        z: 0.0_f32,
32669        covariance: [0.0_f32; 9usize],
32670        reset_counter: 0_u8,
32671    };
32672    #[cfg(feature = "arbitrary")]
32673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32674        use arbitrary::{Arbitrary, Unstructured};
32675        let mut buf = [0u8; 1024];
32676        rng.fill_bytes(&mut buf);
32677        let mut unstructured = Unstructured::new(&buf);
32678        Self::arbitrary(&mut unstructured).unwrap_or_default()
32679    }
32680}
32681impl Default for VISION_SPEED_ESTIMATE_DATA {
32682    fn default() -> Self {
32683        Self::DEFAULT.clone()
32684    }
32685}
32686impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32687    type Message = MavMessage;
32688    const ID: u32 = 103u32;
32689    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32690    const EXTRA_CRC: u8 = 208u8;
32691    const ENCODED_LEN: usize = 57usize;
32692    fn deser(
32693        _version: MavlinkVersion,
32694        __input: &[u8],
32695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32696        let avail_len = __input.len();
32697        let mut payload_buf = [0; Self::ENCODED_LEN];
32698        let mut buf = if avail_len < Self::ENCODED_LEN {
32699            payload_buf[0..avail_len].copy_from_slice(__input);
32700            Bytes::new(&payload_buf)
32701        } else {
32702            Bytes::new(__input)
32703        };
32704        let mut __struct = Self::default();
32705        __struct.usec = buf.get_u64_le();
32706        __struct.x = buf.get_f32_le();
32707        __struct.y = buf.get_f32_le();
32708        __struct.z = buf.get_f32_le();
32709        for v in &mut __struct.covariance {
32710            let val = buf.get_f32_le();
32711            *v = val;
32712        }
32713        __struct.reset_counter = buf.get_u8();
32714        Ok(__struct)
32715    }
32716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32717        let mut __tmp = BytesMut::new(bytes);
32718        #[allow(clippy::absurd_extreme_comparisons)]
32719        #[allow(unused_comparisons)]
32720        if __tmp.remaining() < Self::ENCODED_LEN {
32721            panic!(
32722                "buffer is too small (need {} bytes, but got {})",
32723                Self::ENCODED_LEN,
32724                __tmp.remaining(),
32725            )
32726        }
32727        __tmp.put_u64_le(self.usec);
32728        __tmp.put_f32_le(self.x);
32729        __tmp.put_f32_le(self.y);
32730        __tmp.put_f32_le(self.z);
32731        if matches!(version, MavlinkVersion::V2) {
32732            for val in &self.covariance {
32733                __tmp.put_f32_le(*val);
32734            }
32735            __tmp.put_u8(self.reset_counter);
32736            let len = __tmp.len();
32737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32738        } else {
32739            __tmp.len()
32740        }
32741    }
32742}
32743#[doc = "Cumulative distance traveled for each reported wheel."]
32744#[doc = ""]
32745#[doc = "ID: 9000"]
32746#[derive(Debug, Clone, PartialEq)]
32747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32749#[cfg_attr(feature = "ts", derive(TS))]
32750#[cfg_attr(feature = "ts", ts(export))]
32751pub struct WHEEL_DISTANCE_DATA {
32752    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32753    pub time_usec: u64,
32754    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32757    pub distance: [f64; 16],
32758    #[doc = "Number of wheels reported."]
32759    pub count: u8,
32760}
32761impl WHEEL_DISTANCE_DATA {
32762    pub const ENCODED_LEN: usize = 137usize;
32763    pub const DEFAULT: Self = Self {
32764        time_usec: 0_u64,
32765        distance: [0.0_f64; 16usize],
32766        count: 0_u8,
32767    };
32768    #[cfg(feature = "arbitrary")]
32769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32770        use arbitrary::{Arbitrary, Unstructured};
32771        let mut buf = [0u8; 1024];
32772        rng.fill_bytes(&mut buf);
32773        let mut unstructured = Unstructured::new(&buf);
32774        Self::arbitrary(&mut unstructured).unwrap_or_default()
32775    }
32776}
32777impl Default for WHEEL_DISTANCE_DATA {
32778    fn default() -> Self {
32779        Self::DEFAULT.clone()
32780    }
32781}
32782impl MessageData for WHEEL_DISTANCE_DATA {
32783    type Message = MavMessage;
32784    const ID: u32 = 9000u32;
32785    const NAME: &'static str = "WHEEL_DISTANCE";
32786    const EXTRA_CRC: u8 = 113u8;
32787    const ENCODED_LEN: usize = 137usize;
32788    fn deser(
32789        _version: MavlinkVersion,
32790        __input: &[u8],
32791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32792        let avail_len = __input.len();
32793        let mut payload_buf = [0; Self::ENCODED_LEN];
32794        let mut buf = if avail_len < Self::ENCODED_LEN {
32795            payload_buf[0..avail_len].copy_from_slice(__input);
32796            Bytes::new(&payload_buf)
32797        } else {
32798            Bytes::new(__input)
32799        };
32800        let mut __struct = Self::default();
32801        __struct.time_usec = buf.get_u64_le();
32802        for v in &mut __struct.distance {
32803            let val = buf.get_f64_le();
32804            *v = val;
32805        }
32806        __struct.count = buf.get_u8();
32807        Ok(__struct)
32808    }
32809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32810        let mut __tmp = BytesMut::new(bytes);
32811        #[allow(clippy::absurd_extreme_comparisons)]
32812        #[allow(unused_comparisons)]
32813        if __tmp.remaining() < Self::ENCODED_LEN {
32814            panic!(
32815                "buffer is too small (need {} bytes, but got {})",
32816                Self::ENCODED_LEN,
32817                __tmp.remaining(),
32818            )
32819        }
32820        __tmp.put_u64_le(self.time_usec);
32821        for val in &self.distance {
32822            __tmp.put_f64_le(*val);
32823        }
32824        __tmp.put_u8(self.count);
32825        if matches!(version, MavlinkVersion::V2) {
32826            let len = __tmp.len();
32827            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32828        } else {
32829            __tmp.len()
32830        }
32831    }
32832}
32833#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32834#[doc = ""]
32835#[doc = "ID: 299"]
32836#[derive(Debug, Clone, PartialEq)]
32837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32839#[cfg_attr(feature = "ts", derive(TS))]
32840#[cfg_attr(feature = "ts", ts(export))]
32841pub struct WIFI_CONFIG_AP_DATA {
32842    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32845    pub ssid: [u8; 32],
32846    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32848    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32849    pub password: [u8; 64],
32850    #[doc = "WiFi Mode."]
32851    #[cfg_attr(feature = "serde", serde(default))]
32852    pub mode: WifiConfigApMode,
32853    #[doc = "Message acceptance response (sent back to GS)."]
32854    #[cfg_attr(feature = "serde", serde(default))]
32855    pub response: WifiConfigApResponse,
32856}
32857impl WIFI_CONFIG_AP_DATA {
32858    pub const ENCODED_LEN: usize = 98usize;
32859    pub const DEFAULT: Self = Self {
32860        ssid: [0_u8; 32usize],
32861        password: [0_u8; 64usize],
32862        mode: WifiConfigApMode::DEFAULT,
32863        response: WifiConfigApResponse::DEFAULT,
32864    };
32865    #[cfg(feature = "arbitrary")]
32866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32867        use arbitrary::{Arbitrary, Unstructured};
32868        let mut buf = [0u8; 1024];
32869        rng.fill_bytes(&mut buf);
32870        let mut unstructured = Unstructured::new(&buf);
32871        Self::arbitrary(&mut unstructured).unwrap_or_default()
32872    }
32873}
32874impl Default for WIFI_CONFIG_AP_DATA {
32875    fn default() -> Self {
32876        Self::DEFAULT.clone()
32877    }
32878}
32879impl MessageData for WIFI_CONFIG_AP_DATA {
32880    type Message = MavMessage;
32881    const ID: u32 = 299u32;
32882    const NAME: &'static str = "WIFI_CONFIG_AP";
32883    const EXTRA_CRC: u8 = 19u8;
32884    const ENCODED_LEN: usize = 98usize;
32885    fn deser(
32886        _version: MavlinkVersion,
32887        __input: &[u8],
32888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32889        let avail_len = __input.len();
32890        let mut payload_buf = [0; Self::ENCODED_LEN];
32891        let mut buf = if avail_len < Self::ENCODED_LEN {
32892            payload_buf[0..avail_len].copy_from_slice(__input);
32893            Bytes::new(&payload_buf)
32894        } else {
32895            Bytes::new(__input)
32896        };
32897        let mut __struct = Self::default();
32898        for v in &mut __struct.ssid {
32899            let val = buf.get_u8();
32900            *v = val;
32901        }
32902        for v in &mut __struct.password {
32903            let val = buf.get_u8();
32904            *v = val;
32905        }
32906        let tmp = buf.get_i8();
32907        __struct.mode =
32908            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32909                enum_type: "WifiConfigApMode",
32910                value: tmp as u32,
32911            })?;
32912        let tmp = buf.get_i8();
32913        __struct.response =
32914            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32915                enum_type: "WifiConfigApResponse",
32916                value: tmp as u32,
32917            })?;
32918        Ok(__struct)
32919    }
32920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32921        let mut __tmp = BytesMut::new(bytes);
32922        #[allow(clippy::absurd_extreme_comparisons)]
32923        #[allow(unused_comparisons)]
32924        if __tmp.remaining() < Self::ENCODED_LEN {
32925            panic!(
32926                "buffer is too small (need {} bytes, but got {})",
32927                Self::ENCODED_LEN,
32928                __tmp.remaining(),
32929            )
32930        }
32931        for val in &self.ssid {
32932            __tmp.put_u8(*val);
32933        }
32934        for val in &self.password {
32935            __tmp.put_u8(*val);
32936        }
32937        if matches!(version, MavlinkVersion::V2) {
32938            __tmp.put_i8(self.mode as i8);
32939            __tmp.put_i8(self.response as i8);
32940            let len = __tmp.len();
32941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32942        } else {
32943            __tmp.len()
32944        }
32945    }
32946}
32947#[doc = "Winch status."]
32948#[doc = ""]
32949#[doc = "ID: 9005"]
32950#[derive(Debug, Clone, PartialEq)]
32951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32953#[cfg_attr(feature = "ts", derive(TS))]
32954#[cfg_attr(feature = "ts", ts(export))]
32955pub struct WINCH_STATUS_DATA {
32956    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32957    pub time_usec: u64,
32958    #[doc = "Length of line released. NaN if unknown"]
32959    pub line_length: f32,
32960    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32961    pub speed: f32,
32962    #[doc = "Tension on the line. NaN if unknown"]
32963    pub tension: f32,
32964    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32965    pub voltage: f32,
32966    #[doc = "Current draw from the winch. NaN if unknown"]
32967    pub current: f32,
32968    #[doc = "Status flags"]
32969    pub status: MavWinchStatusFlag,
32970    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32971    pub temperature: i16,
32972}
32973impl WINCH_STATUS_DATA {
32974    pub const ENCODED_LEN: usize = 34usize;
32975    pub const DEFAULT: Self = Self {
32976        time_usec: 0_u64,
32977        line_length: 0.0_f32,
32978        speed: 0.0_f32,
32979        tension: 0.0_f32,
32980        voltage: 0.0_f32,
32981        current: 0.0_f32,
32982        status: MavWinchStatusFlag::DEFAULT,
32983        temperature: 0_i16,
32984    };
32985    #[cfg(feature = "arbitrary")]
32986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32987        use arbitrary::{Arbitrary, Unstructured};
32988        let mut buf = [0u8; 1024];
32989        rng.fill_bytes(&mut buf);
32990        let mut unstructured = Unstructured::new(&buf);
32991        Self::arbitrary(&mut unstructured).unwrap_or_default()
32992    }
32993}
32994impl Default for WINCH_STATUS_DATA {
32995    fn default() -> Self {
32996        Self::DEFAULT.clone()
32997    }
32998}
32999impl MessageData for WINCH_STATUS_DATA {
33000    type Message = MavMessage;
33001    const ID: u32 = 9005u32;
33002    const NAME: &'static str = "WINCH_STATUS";
33003    const EXTRA_CRC: u8 = 117u8;
33004    const ENCODED_LEN: usize = 34usize;
33005    fn deser(
33006        _version: MavlinkVersion,
33007        __input: &[u8],
33008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33009        let avail_len = __input.len();
33010        let mut payload_buf = [0; Self::ENCODED_LEN];
33011        let mut buf = if avail_len < Self::ENCODED_LEN {
33012            payload_buf[0..avail_len].copy_from_slice(__input);
33013            Bytes::new(&payload_buf)
33014        } else {
33015            Bytes::new(__input)
33016        };
33017        let mut __struct = Self::default();
33018        __struct.time_usec = buf.get_u64_le();
33019        __struct.line_length = buf.get_f32_le();
33020        __struct.speed = buf.get_f32_le();
33021        __struct.tension = buf.get_f32_le();
33022        __struct.voltage = buf.get_f32_le();
33023        __struct.current = buf.get_f32_le();
33024        let tmp = buf.get_u32_le();
33025        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33026            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33027                flag_type: "MavWinchStatusFlag",
33028                value: tmp as u32,
33029            })?;
33030        __struct.temperature = buf.get_i16_le();
33031        Ok(__struct)
33032    }
33033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33034        let mut __tmp = BytesMut::new(bytes);
33035        #[allow(clippy::absurd_extreme_comparisons)]
33036        #[allow(unused_comparisons)]
33037        if __tmp.remaining() < Self::ENCODED_LEN {
33038            panic!(
33039                "buffer is too small (need {} bytes, but got {})",
33040                Self::ENCODED_LEN,
33041                __tmp.remaining(),
33042            )
33043        }
33044        __tmp.put_u64_le(self.time_usec);
33045        __tmp.put_f32_le(self.line_length);
33046        __tmp.put_f32_le(self.speed);
33047        __tmp.put_f32_le(self.tension);
33048        __tmp.put_f32_le(self.voltage);
33049        __tmp.put_f32_le(self.current);
33050        __tmp.put_u32_le(self.status.bits());
33051        __tmp.put_i16_le(self.temperature);
33052        if matches!(version, MavlinkVersion::V2) {
33053            let len = __tmp.len();
33054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33055        } else {
33056            __tmp.len()
33057        }
33058    }
33059}
33060#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33061#[doc = ""]
33062#[doc = "ID: 231"]
33063#[derive(Debug, Clone, PartialEq)]
33064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33066#[cfg_attr(feature = "ts", derive(TS))]
33067#[cfg_attr(feature = "ts", ts(export))]
33068pub struct WIND_COV_DATA {
33069    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33070    pub time_usec: u64,
33071    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33072    pub wind_x: f32,
33073    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33074    pub wind_y: f32,
33075    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33076    pub wind_z: f32,
33077    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33078    pub var_horiz: f32,
33079    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33080    pub var_vert: f32,
33081    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33082    pub wind_alt: f32,
33083    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33084    pub horiz_accuracy: f32,
33085    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33086    pub vert_accuracy: f32,
33087}
33088impl WIND_COV_DATA {
33089    pub const ENCODED_LEN: usize = 40usize;
33090    pub const DEFAULT: Self = Self {
33091        time_usec: 0_u64,
33092        wind_x: 0.0_f32,
33093        wind_y: 0.0_f32,
33094        wind_z: 0.0_f32,
33095        var_horiz: 0.0_f32,
33096        var_vert: 0.0_f32,
33097        wind_alt: 0.0_f32,
33098        horiz_accuracy: 0.0_f32,
33099        vert_accuracy: 0.0_f32,
33100    };
33101    #[cfg(feature = "arbitrary")]
33102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33103        use arbitrary::{Arbitrary, Unstructured};
33104        let mut buf = [0u8; 1024];
33105        rng.fill_bytes(&mut buf);
33106        let mut unstructured = Unstructured::new(&buf);
33107        Self::arbitrary(&mut unstructured).unwrap_or_default()
33108    }
33109}
33110impl Default for WIND_COV_DATA {
33111    fn default() -> Self {
33112        Self::DEFAULT.clone()
33113    }
33114}
33115impl MessageData for WIND_COV_DATA {
33116    type Message = MavMessage;
33117    const ID: u32 = 231u32;
33118    const NAME: &'static str = "WIND_COV";
33119    const EXTRA_CRC: u8 = 105u8;
33120    const ENCODED_LEN: usize = 40usize;
33121    fn deser(
33122        _version: MavlinkVersion,
33123        __input: &[u8],
33124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33125        let avail_len = __input.len();
33126        let mut payload_buf = [0; Self::ENCODED_LEN];
33127        let mut buf = if avail_len < Self::ENCODED_LEN {
33128            payload_buf[0..avail_len].copy_from_slice(__input);
33129            Bytes::new(&payload_buf)
33130        } else {
33131            Bytes::new(__input)
33132        };
33133        let mut __struct = Self::default();
33134        __struct.time_usec = buf.get_u64_le();
33135        __struct.wind_x = buf.get_f32_le();
33136        __struct.wind_y = buf.get_f32_le();
33137        __struct.wind_z = buf.get_f32_le();
33138        __struct.var_horiz = buf.get_f32_le();
33139        __struct.var_vert = buf.get_f32_le();
33140        __struct.wind_alt = buf.get_f32_le();
33141        __struct.horiz_accuracy = buf.get_f32_le();
33142        __struct.vert_accuracy = buf.get_f32_le();
33143        Ok(__struct)
33144    }
33145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33146        let mut __tmp = BytesMut::new(bytes);
33147        #[allow(clippy::absurd_extreme_comparisons)]
33148        #[allow(unused_comparisons)]
33149        if __tmp.remaining() < Self::ENCODED_LEN {
33150            panic!(
33151                "buffer is too small (need {} bytes, but got {})",
33152                Self::ENCODED_LEN,
33153                __tmp.remaining(),
33154            )
33155        }
33156        __tmp.put_u64_le(self.time_usec);
33157        __tmp.put_f32_le(self.wind_x);
33158        __tmp.put_f32_le(self.wind_y);
33159        __tmp.put_f32_le(self.wind_z);
33160        __tmp.put_f32_le(self.var_horiz);
33161        __tmp.put_f32_le(self.var_vert);
33162        __tmp.put_f32_le(self.wind_alt);
33163        __tmp.put_f32_le(self.horiz_accuracy);
33164        __tmp.put_f32_le(self.vert_accuracy);
33165        if matches!(version, MavlinkVersion::V2) {
33166            let len = __tmp.len();
33167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33168        } else {
33169            __tmp.len()
33170        }
33171    }
33172}
33173#[derive(Clone, PartialEq, Debug)]
33174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33175#[cfg_attr(feature = "serde", serde(tag = "type"))]
33176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33177#[cfg_attr(feature = "ts", derive(TS))]
33178#[cfg_attr(feature = "ts", ts(export))]
33179#[repr(u32)]
33180pub enum MavMessage {
33181    #[doc = "Set the vehicle attitude and body angular rates."]
33182    #[doc = ""]
33183    #[doc = "ID: 140"]
33184    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33185    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33186    #[doc = ""]
33187    #[doc = "ID: 375"]
33188    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33189    #[doc = "The location and information of an ADSB vehicle."]
33190    #[doc = ""]
33191    #[doc = "ID: 246"]
33192    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33193    #[doc = "The location and information of an AIS vessel."]
33194    #[doc = ""]
33195    #[doc = "ID: 301"]
33196    AIS_VESSEL(AIS_VESSEL_DATA),
33197    #[doc = "The current system altitude."]
33198    #[doc = ""]
33199    #[doc = "ID: 141"]
33200    ALTITUDE(ALTITUDE_DATA),
33201    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33202    #[doc = ""]
33203    #[doc = "ID: 30"]
33204    ATTITUDE(ATTITUDE_DATA),
33205    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33206    #[doc = ""]
33207    #[doc = "ID: 31"]
33208    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33209    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33210    #[doc = ""]
33211    #[doc = "ID: 61"]
33212    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33213    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33214    #[doc = ""]
33215    #[doc = "ID: 83"]
33216    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33217    #[doc = "Motion capture attitude and position."]
33218    #[doc = ""]
33219    #[doc = "ID: 138"]
33220    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33221    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33222    #[doc = ""]
33223    #[doc = "ID: 7"]
33224    AUTH_KEY(AUTH_KEY_DATA),
33225    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33226    #[doc = ""]
33227    #[doc = "ID: 286"]
33228    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33229    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33230    #[doc = ""]
33231    #[doc = "ID: 148"]
33232    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33233    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33234    #[doc = ""]
33235    #[doc = "ID: 435"]
33236    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33237    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33238    #[doc = ""]
33239    #[doc = "ID: 437"]
33240    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33241    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33242    #[doc = ""]
33243    #[doc = "ID: 372"]
33244    BATTERY_INFO(BATTERY_INFO_DATA),
33245    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33246    #[doc = ""]
33247    #[doc = "ID: 147"]
33248    BATTERY_STATUS(BATTERY_STATUS_DATA),
33249    #[doc = "Report button state change."]
33250    #[doc = ""]
33251    #[doc = "ID: 257"]
33252    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33253    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33254    #[doc = ""]
33255    #[doc = "ID: 262"]
33256    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33257    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33258    #[doc = ""]
33259    #[doc = "ID: 271"]
33260    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33261    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33262    #[doc = ""]
33263    #[doc = "ID: 263"]
33264    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33265    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33266    #[doc = ""]
33267    #[doc = "ID: 259"]
33268    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33269    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33270    #[doc = ""]
33271    #[doc = "ID: 260"]
33272    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33273    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33274    #[doc = ""]
33275    #[doc = "ID: 277"]
33276    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33277    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33278    #[doc = ""]
33279    #[doc = "ID: 276"]
33280    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33281    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33282    #[doc = ""]
33283    #[doc = "ID: 275"]
33284    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33285    #[doc = "Camera-IMU triggering and synchronisation message."]
33286    #[doc = ""]
33287    #[doc = "ID: 112"]
33288    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33289    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33290    #[doc = ""]
33291    #[doc = "ID: 387"]
33292    CANFD_FRAME(CANFD_FRAME_DATA),
33293    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33294    #[doc = ""]
33295    #[doc = "ID: 388"]
33296    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33297    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33298    #[doc = ""]
33299    #[doc = "ID: 386"]
33300    CAN_FRAME(CAN_FRAME_DATA),
33301    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33302    #[doc = ""]
33303    #[doc = "ID: 336"]
33304    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33305    #[doc = "Report current used cellular network status."]
33306    #[doc = ""]
33307    #[doc = "ID: 334"]
33308    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33309    #[doc = "Request to control this MAV."]
33310    #[doc = ""]
33311    #[doc = "ID: 5"]
33312    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33313    #[doc = "Accept / deny control of this MAV."]
33314    #[doc = ""]
33315    #[doc = "ID: 6"]
33316    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33317    #[doc = "Information about a potential collision."]
33318    #[doc = ""]
33319    #[doc = "ID: 247"]
33320    COLLISION(COLLISION_DATA),
33321    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33322    #[doc = ""]
33323    #[doc = "ID: 77"]
33324    COMMAND_ACK(COMMAND_ACK_DATA),
33325    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33326    #[doc = ""]
33327    #[doc = "ID: 80"]
33328    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33329    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33330    #[doc = ""]
33331    #[doc = "ID: 75"]
33332    COMMAND_INT(COMMAND_INT_DATA),
33333    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33334    #[doc = ""]
33335    #[doc = "ID: 76"]
33336    COMMAND_LONG(COMMAND_LONG_DATA),
33337    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33338    #[doc = ""]
33339    #[doc = "ID: 395"]
33340    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33341    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33342    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33343    #[doc = ""]
33344    #[doc = "ID: 396"]
33345    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33346    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33347    #[doc = ""]
33348    #[doc = "ID: 397"]
33349    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33350    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33351    #[doc = ""]
33352    #[doc = "ID: 146"]
33353    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33354    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33355    #[doc = ""]
33356    #[doc = "ID: 411"]
33357    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33358    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33359    #[doc = ""]
33360    #[doc = "ID: 436"]
33361    CURRENT_MODE(CURRENT_MODE_DATA),
33362    #[doc = "Data stream status information."]
33363    #[doc = ""]
33364    #[doc = "ID: 67"]
33365    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33366    DATA_STREAM(DATA_STREAM_DATA),
33367    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33368    #[doc = ""]
33369    #[doc = "ID: 130"]
33370    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33371    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33372    #[doc = ""]
33373    #[doc = "ID: 254"]
33374    DEBUG(DEBUG_DATA),
33375    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33376    #[doc = ""]
33377    #[doc = "ID: 350"]
33378    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33379    #[doc = "To debug something using a named 3D vector."]
33380    #[doc = ""]
33381    #[doc = "ID: 250"]
33382    DEBUG_VECT(DEBUG_VECT_DATA),
33383    #[doc = "Distance sensor information for an onboard rangefinder."]
33384    #[doc = ""]
33385    #[doc = "ID: 132"]
33386    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33387    #[doc = "EFI status output."]
33388    #[doc = ""]
33389    #[doc = "ID: 225"]
33390    EFI_STATUS(EFI_STATUS_DATA),
33391    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33392    #[doc = ""]
33393    #[doc = "ID: 131"]
33394    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33395    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33396    #[doc = ""]
33397    #[doc = "ID: 290"]
33398    ESC_INFO(ESC_INFO_DATA),
33399    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33400    #[doc = ""]
33401    #[doc = "ID: 291"]
33402    ESC_STATUS(ESC_STATUS_DATA),
33403    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33404    #[doc = ""]
33405    #[doc = "ID: 230"]
33406    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33407    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33408    #[doc = ""]
33409    #[doc = "ID: 410"]
33410    EVENT(EVENT_DATA),
33411    #[doc = "Provides state for additional features."]
33412    #[doc = ""]
33413    #[doc = "ID: 245"]
33414    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33415    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33416    #[doc = ""]
33417    #[doc = "ID: 162"]
33418    FENCE_STATUS(FENCE_STATUS_DATA),
33419    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33420    #[doc = ""]
33421    #[doc = "ID: 110"]
33422    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33423    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33424    #[doc = ""]
33425    #[doc = "ID: 264"]
33426    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33427    #[doc = "Current motion information from a designated system."]
33428    #[doc = ""]
33429    #[doc = "ID: 144"]
33430    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33431    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33432    #[doc = ""]
33433    #[doc = "ID: 371"]
33434    FUEL_STATUS(FUEL_STATUS_DATA),
33435    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33436    #[doc = ""]
33437    #[doc = "ID: 373"]
33438    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33439    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33440    #[doc = ""]
33441    #[doc = "ID: 285"]
33442    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33443    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33444    #[doc = ""]
33445    #[doc = "ID: 283"]
33446    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33447    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33448    #[doc = ""]
33449    #[doc = "ID: 284"]
33450    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33451    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33452    #[doc = ""]
33453    #[doc = "ID: 280"]
33454    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33455    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33456    #[doc = ""]
33457    #[doc = "ID: 282"]
33458    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33459    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33460    #[doc = ""]
33461    #[doc = "ID: 288"]
33462    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33463    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33464    #[doc = ""]
33465    #[doc = "ID: 287"]
33466    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33467    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33468    #[doc = ""]
33469    #[doc = "ID: 281"]
33470    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33471    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33472    #[doc = ""]
33473    #[doc = "ID: 33"]
33474    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33475    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33476    #[doc = ""]
33477    #[doc = "ID: 63"]
33478    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33479    #[doc = "Global position/attitude estimate from a vision source."]
33480    #[doc = ""]
33481    #[doc = "ID: 101"]
33482    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33483    #[doc = "Second GPS data."]
33484    #[doc = ""]
33485    #[doc = "ID: 124"]
33486    GPS2_RAW(GPS2_RAW_DATA),
33487    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33488    #[doc = ""]
33489    #[doc = "ID: 128"]
33490    GPS2_RTK(GPS2_RTK_DATA),
33491    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33492    #[doc = ""]
33493    #[doc = "ID: 49"]
33494    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33495    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33496    #[doc = ""]
33497    #[doc = "ID: 123"]
33498    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33499    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33500    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33501    #[doc = ""]
33502    #[doc = "ID: 232"]
33503    GPS_INPUT(GPS_INPUT_DATA),
33504    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33505    #[doc = ""]
33506    #[doc = "ID: 24"]
33507    GPS_RAW_INT(GPS_RAW_INT_DATA),
33508    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33509    #[doc = ""]
33510    #[doc = "ID: 233"]
33511    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33512    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33513    #[doc = ""]
33514    #[doc = "ID: 127"]
33515    GPS_RTK(GPS_RTK_DATA),
33516    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33517    #[doc = ""]
33518    #[doc = "ID: 25"]
33519    GPS_STATUS(GPS_STATUS_DATA),
33520    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
33521    #[doc = ""]
33522    #[doc = "ID: 0"]
33523    HEARTBEAT(HEARTBEAT_DATA),
33524    #[doc = "The IMU readings in SI units in NED body frame."]
33525    #[doc = ""]
33526    #[doc = "ID: 105"]
33527    HIGHRES_IMU(HIGHRES_IMU_DATA),
33528    #[doc = "Message appropriate for high latency connections like Iridium."]
33529    #[doc = ""]
33530    #[doc = "ID: 234"]
33531    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33532    HIGH_LATENCY(HIGH_LATENCY_DATA),
33533    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
33534    #[doc = ""]
33535    #[doc = "ID: 235"]
33536    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33537    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
33538    #[doc = ""]
33539    #[doc = "ID: 93"]
33540    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33541    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
33542    #[doc = ""]
33543    #[doc = "ID: 91"]
33544    HIL_CONTROLS(HIL_CONTROLS_DATA),
33545    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33546    #[doc = ""]
33547    #[doc = "ID: 113"]
33548    HIL_GPS(HIL_GPS_DATA),
33549    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
33550    #[doc = ""]
33551    #[doc = "ID: 114"]
33552    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33553    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
33554    #[doc = ""]
33555    #[doc = "ID: 92"]
33556    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33557    #[doc = "The IMU readings in SI units in NED body frame."]
33558    #[doc = ""]
33559    #[doc = "ID: 107"]
33560    HIL_SENSOR(HIL_SENSOR_DATA),
33561    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33562    #[doc = ""]
33563    #[doc = "ID: 90"]
33564    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33565    HIL_STATE(HIL_STATE_DATA),
33566    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33567    #[doc = ""]
33568    #[doc = "ID: 115"]
33569    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33570    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33571    #[doc = ""]
33572    #[doc = "ID: 242"]
33573    HOME_POSITION(HOME_POSITION_DATA),
33574    #[doc = "Temperature and humidity from hygrometer."]
33575    #[doc = ""]
33576    #[doc = "ID: 12920"]
33577    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33578    #[doc = "Illuminator status."]
33579    #[doc = ""]
33580    #[doc = "ID: 440"]
33581    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33582    #[doc = "Status of the Iridium SBD link."]
33583    #[doc = ""]
33584    #[doc = "ID: 335"]
33585    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33586    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33587    #[doc = ""]
33588    #[doc = "ID: 149"]
33589    LANDING_TARGET(LANDING_TARGET_DATA),
33590    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33591    #[doc = ""]
33592    #[doc = "ID: 8"]
33593    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33594    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33595    #[doc = ""]
33596    #[doc = "ID: 32"]
33597    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33598    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33599    #[doc = ""]
33600    #[doc = "ID: 64"]
33601    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33602    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33603    #[doc = ""]
33604    #[doc = "ID: 89"]
33605    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33606    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33607    #[doc = ""]
33608    #[doc = "ID: 268"]
33609    LOGGING_ACK(LOGGING_ACK_DATA),
33610    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33611    #[doc = ""]
33612    #[doc = "ID: 266"]
33613    LOGGING_DATA(LOGGING_DATA_DATA),
33614    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33615    #[doc = ""]
33616    #[doc = "ID: 267"]
33617    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33618    #[doc = "Reply to LOG_REQUEST_DATA."]
33619    #[doc = ""]
33620    #[doc = "ID: 120"]
33621    LOG_DATA(LOG_DATA_DATA),
33622    #[doc = "Reply to LOG_REQUEST_LIST."]
33623    #[doc = ""]
33624    #[doc = "ID: 118"]
33625    LOG_ENTRY(LOG_ENTRY_DATA),
33626    #[doc = "Erase all logs."]
33627    #[doc = ""]
33628    #[doc = "ID: 121"]
33629    LOG_ERASE(LOG_ERASE_DATA),
33630    #[doc = "Request a chunk of a log."]
33631    #[doc = ""]
33632    #[doc = "ID: 119"]
33633    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33634    #[doc = "Stop log transfer and resume normal logging."]
33635    #[doc = ""]
33636    #[doc = "ID: 122"]
33637    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33638    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33639    #[doc = ""]
33640    #[doc = "ID: 117"]
33641    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33642    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33643    #[doc = ""]
33644    #[doc = "ID: 192"]
33645    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33646    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33647    #[doc = ""]
33648    #[doc = "ID: 69"]
33649    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33650    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33651    #[doc = ""]
33652    #[doc = "ID: 81"]
33653    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33654    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33655    #[doc = ""]
33656    #[doc = "ID: 249"]
33657    MEMORY_VECT(MEMORY_VECT_DATA),
33658    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33659    #[doc = ""]
33660    #[doc = "ID: 244"]
33661    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33662    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33663    #[doc = ""]
33664    #[doc = "ID: 47"]
33665    MISSION_ACK(MISSION_ACK_DATA),
33666    #[doc = "Delete all mission items at once."]
33667    #[doc = ""]
33668    #[doc = "ID: 45"]
33669    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33670    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33671    #[doc = ""]
33672    #[doc = "ID: 44"]
33673    MISSION_COUNT(MISSION_COUNT_DATA),
33674    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33675    #[doc = ""]
33676    #[doc = "ID: 42"]
33677    MISSION_CURRENT(MISSION_CURRENT_DATA),
33678    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33679    #[doc = ""]
33680    #[doc = "ID: 39"]
33681    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33682    MISSION_ITEM(MISSION_ITEM_DATA),
33683    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33684    #[doc = ""]
33685    #[doc = "ID: 73"]
33686    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33687    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33688    #[doc = ""]
33689    #[doc = "ID: 46"]
33690    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33691    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33692    #[doc = ""]
33693    #[doc = "ID: 40"]
33694    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33695    MISSION_REQUEST(MISSION_REQUEST_DATA),
33696    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33697    #[doc = ""]
33698    #[doc = "ID: 51"]
33699    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33700    #[doc = "Request the overall list of mission items from the system/component."]
33701    #[doc = ""]
33702    #[doc = "ID: 43"]
33703    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33704    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33705    #[doc = ""]
33706    #[doc = "ID: 37"]
33707    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33708    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33709    #[doc = ""]
33710    #[doc = "ID: 41"]
33711    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33712    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33713    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33714    #[doc = ""]
33715    #[doc = "ID: 38"]
33716    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33717    #[doc = "Orientation of a mount."]
33718    #[doc = ""]
33719    #[doc = "ID: 265"]
33720    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33721    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33722    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33723    #[doc = ""]
33724    #[doc = "ID: 251"]
33725    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33726    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33727    #[doc = ""]
33728    #[doc = "ID: 252"]
33729    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33730    #[doc = "The state of the navigation and position controller."]
33731    #[doc = ""]
33732    #[doc = "ID: 62"]
33733    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33734    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33735    #[doc = ""]
33736    #[doc = "ID: 330"]
33737    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33738    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33739    #[doc = ""]
33740    #[doc = "ID: 331"]
33741    ODOMETRY(ODOMETRY_DATA),
33742    #[doc = "Hardware status sent by an onboard computer."]
33743    #[doc = ""]
33744    #[doc = "ID: 390"]
33745    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33746    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33747    #[doc = ""]
33748    #[doc = "ID: 12918"]
33749    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33750    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33751    #[doc = ""]
33752    #[doc = "ID: 12902"]
33753    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33754    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33755    #[doc = ""]
33756    #[doc = "ID: 12900"]
33757    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33758    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33759    #[doc = ""]
33760    #[doc = "ID: 12901"]
33761    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33762    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33763    #[doc = ""]
33764    #[doc = "ID: 12915"]
33765    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33766    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33767    #[doc = ""]
33768    #[doc = "ID: 12905"]
33769    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33770    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33771    #[doc = ""]
33772    #[doc = "ID: 12903"]
33773    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33774    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33775    #[doc = ""]
33776    #[doc = "ID: 12904"]
33777    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33778    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33779    #[doc = ""]
33780    #[doc = "ID: 12919"]
33781    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33782    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33783    #[doc = ""]
33784    #[doc = "ID: 100"]
33785    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33786    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33787    #[doc = ""]
33788    #[doc = "ID: 106"]
33789    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33790    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33791    #[doc = ""]
33792    #[doc = "ID: 360"]
33793    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33794    #[doc = "Response from a PARAM_EXT_SET message."]
33795    #[doc = ""]
33796    #[doc = "ID: 324"]
33797    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33798    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33799    #[doc = ""]
33800    #[doc = "ID: 321"]
33801    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33802    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33803    #[doc = ""]
33804    #[doc = "ID: 320"]
33805    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33806    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33807    #[doc = ""]
33808    #[doc = "ID: 323"]
33809    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33810    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33811    #[doc = ""]
33812    #[doc = "ID: 322"]
33813    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33814    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33815    #[doc = ""]
33816    #[doc = "ID: 50"]
33817    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33818    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33819    #[doc = ""]
33820    #[doc = "ID: 21"]
33821    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33822    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33823    #[doc = ""]
33824    #[doc = "ID: 20"]
33825    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33826    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33827    #[doc = ""]
33828    #[doc = "ID: 23"]
33829    PARAM_SET(PARAM_SET_DATA),
33830    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33831    #[doc = ""]
33832    #[doc = "ID: 22"]
33833    PARAM_VALUE(PARAM_VALUE_DATA),
33834    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33835    #[doc = ""]
33836    #[doc = "ID: 4"]
33837    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33838    PING(PING_DATA),
33839    #[doc = "Control vehicle tone generation (buzzer)."]
33840    #[doc = ""]
33841    #[doc = "ID: 258"]
33842    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33843    PLAY_TUNE(PLAY_TUNE_DATA),
33844    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33845    #[doc = ""]
33846    #[doc = "ID: 400"]
33847    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33848    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33849    #[doc = ""]
33850    #[doc = "ID: 87"]
33851    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33852    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33853    #[doc = ""]
33854    #[doc = "ID: 85"]
33855    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33856    #[doc = "Power supply status."]
33857    #[doc = ""]
33858    #[doc = "ID: 125"]
33859    POWER_STATUS(POWER_STATUS_DATA),
33860    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33861    #[doc = ""]
33862    #[doc = "ID: 300"]
33863    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33864    #[doc = "Status generated by radio and injected into MAVLink stream."]
33865    #[doc = ""]
33866    #[doc = "ID: 109"]
33867    RADIO_STATUS(RADIO_STATUS_DATA),
33868    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33869    #[doc = ""]
33870    #[doc = "ID: 27"]
33871    RAW_IMU(RAW_IMU_DATA),
33872    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33873    #[doc = ""]
33874    #[doc = "ID: 28"]
33875    RAW_PRESSURE(RAW_PRESSURE_DATA),
33876    #[doc = "RPM sensor data message."]
33877    #[doc = ""]
33878    #[doc = "ID: 339"]
33879    RAW_RPM(RAW_RPM_DATA),
33880    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33881    #[doc = ""]
33882    #[doc = "ID: 65"]
33883    RC_CHANNELS(RC_CHANNELS_DATA),
33884    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33885    #[doc = ""]
33886    #[doc = "ID: 70"]
33887    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33888    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33889    #[doc = ""]
33890    #[doc = "ID: 35"]
33891    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33892    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33893    #[doc = ""]
33894    #[doc = "ID: 34"]
33895    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33896    #[doc = "Request a data stream."]
33897    #[doc = ""]
33898    #[doc = "ID: 66"]
33899    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33900    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33901    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33902    #[doc = ""]
33903    #[doc = "ID: 412"]
33904    REQUEST_EVENT(REQUEST_EVENT_DATA),
33905    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33906    #[doc = ""]
33907    #[doc = "ID: 142"]
33908    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33909    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33910    #[doc = ""]
33911    #[doc = "ID: 413"]
33912    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33913    #[doc = "Read out the safety zone the MAV currently assumes."]
33914    #[doc = ""]
33915    #[doc = "ID: 55"]
33916    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33917    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33918    #[doc = ""]
33919    #[doc = "ID: 54"]
33920    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33921    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33922    #[doc = ""]
33923    #[doc = "ID: 26"]
33924    SCALED_IMU(SCALED_IMU_DATA),
33925    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33926    #[doc = ""]
33927    #[doc = "ID: 116"]
33928    SCALED_IMU2(SCALED_IMU2_DATA),
33929    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33930    #[doc = ""]
33931    #[doc = "ID: 129"]
33932    SCALED_IMU3(SCALED_IMU3_DATA),
33933    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33934    #[doc = ""]
33935    #[doc = "ID: 29"]
33936    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33937    #[doc = "Barometer readings for 2nd barometer."]
33938    #[doc = ""]
33939    #[doc = "ID: 137"]
33940    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33941    #[doc = "Barometer readings for 3rd barometer."]
33942    #[doc = ""]
33943    #[doc = "ID: 143"]
33944    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33945    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33946    #[doc = ""]
33947    #[doc = "ID: 126"]
33948    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33949    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33950    #[doc = ""]
33951    #[doc = "ID: 36"]
33952    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33953    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33954    #[doc = ""]
33955    #[doc = "ID: 256"]
33956    SETUP_SIGNING(SETUP_SIGNING_DATA),
33957    #[doc = "Set the vehicle attitude and body angular rates."]
33958    #[doc = ""]
33959    #[doc = "ID: 139"]
33960    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33961    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33962    #[doc = ""]
33963    #[doc = "ID: 82"]
33964    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33965    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33966    #[doc = ""]
33967    #[doc = "ID: 48"]
33968    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33969    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33970    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33971    #[doc = ""]
33972    #[doc = "ID: 243"]
33973    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33974    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33975    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33976    #[doc = ""]
33977    #[doc = "ID: 11"]
33978    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33979    SET_MODE(SET_MODE_DATA),
33980    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33981    #[doc = ""]
33982    #[doc = "ID: 86"]
33983    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33984    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33985    #[doc = ""]
33986    #[doc = "ID: 84"]
33987    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33988    #[doc = "Status of simulation environment, if used."]
33989    #[doc = ""]
33990    #[doc = "ID: 108"]
33991    SIM_STATE(SIM_STATE_DATA),
33992    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33993    #[doc = ""]
33994    #[doc = "ID: 370"]
33995    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33996    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33997    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33998    #[doc = ""]
33999    #[doc = "ID: 253"]
34000    STATUSTEXT(STATUSTEXT_DATA),
34001    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34002    #[doc = ""]
34003    #[doc = "ID: 261"]
34004    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34005    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34006    #[doc = ""]
34007    #[doc = "ID: 401"]
34008    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34009    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34010    #[doc = ""]
34011    #[doc = "ID: 2"]
34012    SYSTEM_TIME(SYSTEM_TIME_DATA),
34013    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34014    #[doc = ""]
34015    #[doc = "ID: 1"]
34016    SYS_STATUS(SYS_STATUS_DATA),
34017    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34018    #[doc = ""]
34019    #[doc = "ID: 135"]
34020    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34021    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34022    #[doc = ""]
34023    #[doc = "ID: 134"]
34024    TERRAIN_DATA(TERRAIN_DATA_DATA),
34025    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34026    #[doc = ""]
34027    #[doc = "ID: 136"]
34028    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34029    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34030    #[doc = ""]
34031    #[doc = "ID: 133"]
34032    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34033    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34034    #[doc = ""]
34035    #[doc = "ID: 111"]
34036    TIMESYNC(TIMESYNC_DATA),
34037    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34038    #[doc = ""]
34039    #[doc = "ID: 380"]
34040    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34041    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34042    #[doc = ""]
34043    #[doc = "ID: 333"]
34044    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34045    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34046    #[doc = ""]
34047    #[doc = "ID: 332"]
34048    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34049    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34050    #[doc = ""]
34051    #[doc = "ID: 385"]
34052    TUNNEL(TUNNEL_DATA),
34053    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34054    #[doc = ""]
34055    #[doc = "ID: 311"]
34056    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34057    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34058    #[doc = ""]
34059    #[doc = "ID: 310"]
34060    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34061    #[doc = "Request messages."]
34062    #[doc = ""]
34063    #[doc = "ID: 10006"]
34064    UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA),
34065    #[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
34066    #[doc = ""]
34067    #[doc = "ID: 10001"]
34068    UAVIONIX_ADSB_OUT_CFG(UAVIONIX_ADSB_OUT_CFG_DATA),
34069    #[doc = "Flight Identification for ADSB-Out vehicles."]
34070    #[doc = ""]
34071    #[doc = "ID: 10005"]
34072    UAVIONIX_ADSB_OUT_CFG_FLIGHTID(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA),
34073    #[doc = "Aircraft Registration."]
34074    #[doc = ""]
34075    #[doc = "ID: 10004"]
34076    UAVIONIX_ADSB_OUT_CFG_REGISTRATION(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA),
34077    #[doc = "Control message with all data sent in UCP control message."]
34078    #[doc = ""]
34079    #[doc = "ID: 10007"]
34080    UAVIONIX_ADSB_OUT_CONTROL(UAVIONIX_ADSB_OUT_CONTROL_DATA),
34081    #[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
34082    #[doc = ""]
34083    #[doc = "ID: 10002"]
34084    UAVIONIX_ADSB_OUT_DYNAMIC(UAVIONIX_ADSB_OUT_DYNAMIC_DATA),
34085    #[doc = "Status message with information from UCP Heartbeat and Status messages."]
34086    #[doc = ""]
34087    #[doc = "ID: 10008"]
34088    UAVIONIX_ADSB_OUT_STATUS(UAVIONIX_ADSB_OUT_STATUS_DATA),
34089    #[doc = "Transceiver heartbeat with health report (updated every 10s)."]
34090    #[doc = ""]
34091    #[doc = "ID: 10003"]
34092    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA),
34093    #[doc = "The global position resulting from GPS and sensor fusion."]
34094    #[doc = ""]
34095    #[doc = "ID: 340"]
34096    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34097    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34098    #[doc = ""]
34099    #[doc = "ID: 248"]
34100    V2_EXTENSION(V2_EXTENSION_DATA),
34101    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34102    #[doc = ""]
34103    #[doc = "ID: 74"]
34104    VFR_HUD(VFR_HUD_DATA),
34105    #[doc = "Vibration levels and accelerometer clipping."]
34106    #[doc = ""]
34107    #[doc = "ID: 241"]
34108    VIBRATION(VIBRATION_DATA),
34109    #[doc = "Global position estimate from a Vicon motion system source."]
34110    #[doc = ""]
34111    #[doc = "ID: 104"]
34112    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34113    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34114    #[doc = ""]
34115    #[doc = "ID: 269"]
34116    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34117    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34118    #[doc = ""]
34119    #[doc = "ID: 270"]
34120    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34121    #[doc = "Local position/attitude estimate from a vision source."]
34122    #[doc = ""]
34123    #[doc = "ID: 102"]
34124    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34125    #[doc = "Speed estimate from a vision source."]
34126    #[doc = ""]
34127    #[doc = "ID: 103"]
34128    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34129    #[doc = "Cumulative distance traveled for each reported wheel."]
34130    #[doc = ""]
34131    #[doc = "ID: 9000"]
34132    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34133    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34134    #[doc = ""]
34135    #[doc = "ID: 299"]
34136    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34137    #[doc = "Winch status."]
34138    #[doc = ""]
34139    #[doc = "ID: 9005"]
34140    WINCH_STATUS(WINCH_STATUS_DATA),
34141    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34142    #[doc = ""]
34143    #[doc = "ID: 231"]
34144    WIND_COV(WIND_COV_DATA),
34145}
34146impl MavMessage {
34147    pub const fn all_ids() -> &'static [u32] {
34148        &[
34149            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34150            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34151            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34152            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34153            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34154            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34155            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34156            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34157            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34158            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34159            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34160            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34161            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34162            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34163            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34164            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
34165            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
34166            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
34167            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
34168            440u32, 9000u32, 9005u32, 10001u32, 10002u32, 10003u32, 10004u32, 10005u32, 10006u32,
34169            10007u32, 10008u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
34170            12915u32, 12918u32, 12919u32, 12920u32,
34171        ]
34172    }
34173}
34174impl Message for MavMessage {
34175    fn parse(
34176        version: MavlinkVersion,
34177        id: u32,
34178        payload: &[u8],
34179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34180        match id {
34181            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34182                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34183                    .map(Self::ACTUATOR_CONTROL_TARGET)
34184            }
34185            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34186                .map(Self::ACTUATOR_OUTPUT_STATUS),
34187            ADSB_VEHICLE_DATA::ID => {
34188                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34189            }
34190            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34191            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34192            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34193            ATTITUDE_QUATERNION_DATA::ID => {
34194                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34195            }
34196            ATTITUDE_QUATERNION_COV_DATA::ID => {
34197                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34198                    .map(Self::ATTITUDE_QUATERNION_COV)
34199            }
34200            ATTITUDE_TARGET_DATA::ID => {
34201                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34202            }
34203            ATT_POS_MOCAP_DATA::ID => {
34204                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34205            }
34206            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34207            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34208                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34209                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34210            }
34211            AUTOPILOT_VERSION_DATA::ID => {
34212                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34213            }
34214            AVAILABLE_MODES_DATA::ID => {
34215                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34216            }
34217            AVAILABLE_MODES_MONITOR_DATA::ID => {
34218                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34219                    .map(Self::AVAILABLE_MODES_MONITOR)
34220            }
34221            BATTERY_INFO_DATA::ID => {
34222                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34223            }
34224            BATTERY_STATUS_DATA::ID => {
34225                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34226            }
34227            BUTTON_CHANGE_DATA::ID => {
34228                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34229            }
34230            CAMERA_CAPTURE_STATUS_DATA::ID => {
34231                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34232            }
34233            CAMERA_FOV_STATUS_DATA::ID => {
34234                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34235            }
34236            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34237                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34238            }
34239            CAMERA_INFORMATION_DATA::ID => {
34240                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34241            }
34242            CAMERA_SETTINGS_DATA::ID => {
34243                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34244            }
34245            CAMERA_THERMAL_RANGE_DATA::ID => {
34246                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34247            }
34248            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34249                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34250                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34251            }
34252            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34253                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34254                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34255            }
34256            CAMERA_TRIGGER_DATA::ID => {
34257                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34258            }
34259            CANFD_FRAME_DATA::ID => {
34260                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34261            }
34262            CAN_FILTER_MODIFY_DATA::ID => {
34263                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34264            }
34265            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34266            CELLULAR_CONFIG_DATA::ID => {
34267                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34268            }
34269            CELLULAR_STATUS_DATA::ID => {
34270                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34271            }
34272            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34273                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34274                    .map(Self::CHANGE_OPERATOR_CONTROL)
34275            }
34276            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34277                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34278                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34279            }
34280            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34281            COMMAND_ACK_DATA::ID => {
34282                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34283            }
34284            COMMAND_CANCEL_DATA::ID => {
34285                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34286            }
34287            COMMAND_INT_DATA::ID => {
34288                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34289            }
34290            COMMAND_LONG_DATA::ID => {
34291                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34292            }
34293            COMPONENT_INFORMATION_DATA::ID => {
34294                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34295            }
34296            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34297                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34298                    .map(Self::COMPONENT_INFORMATION_BASIC)
34299            }
34300            COMPONENT_METADATA_DATA::ID => {
34301                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34302            }
34303            CONTROL_SYSTEM_STATE_DATA::ID => {
34304                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34305            }
34306            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34307                .map(Self::CURRENT_EVENT_SEQUENCE),
34308            CURRENT_MODE_DATA::ID => {
34309                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34310            }
34311            DATA_STREAM_DATA::ID => {
34312                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34313            }
34314            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34315                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34316                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34317            }
34318            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34319            DEBUG_FLOAT_ARRAY_DATA::ID => {
34320                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34321            }
34322            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34323            DISTANCE_SENSOR_DATA::ID => {
34324                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34325            }
34326            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34327            ENCAPSULATED_DATA_DATA::ID => {
34328                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34329            }
34330            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34331            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34332            ESTIMATOR_STATUS_DATA::ID => {
34333                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34334            }
34335            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34336            EXTENDED_SYS_STATE_DATA::ID => {
34337                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34338            }
34339            FENCE_STATUS_DATA::ID => {
34340                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34341            }
34342            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34343                .map(Self::FILE_TRANSFER_PROTOCOL),
34344            FLIGHT_INFORMATION_DATA::ID => {
34345                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34346            }
34347            FOLLOW_TARGET_DATA::ID => {
34348                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34349            }
34350            FUEL_STATUS_DATA::ID => {
34351                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34352            }
34353            GENERATOR_STATUS_DATA::ID => {
34354                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34355            }
34356            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34357                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34358                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34359            }
34360            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34361                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34362                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34363            }
34364            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34365                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34366                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34367            }
34368            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34369                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34370                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34371            }
34372            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34373                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34374                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34375            }
34376            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34377                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34378                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34379            }
34380            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34381                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34382                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34383            }
34384            GIMBAL_MANAGER_STATUS_DATA::ID => {
34385                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34386            }
34387            GLOBAL_POSITION_INT_DATA::ID => {
34388                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34389            }
34390            GLOBAL_POSITION_INT_COV_DATA::ID => {
34391                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34392                    .map(Self::GLOBAL_POSITION_INT_COV)
34393            }
34394            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34395                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34396                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34397            }
34398            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34399            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34400            GPS_GLOBAL_ORIGIN_DATA::ID => {
34401                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34402            }
34403            GPS_INJECT_DATA_DATA::ID => {
34404                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34405            }
34406            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34407            GPS_RAW_INT_DATA::ID => {
34408                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34409            }
34410            GPS_RTCM_DATA_DATA::ID => {
34411                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34412            }
34413            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34414            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34415            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34416            HIGHRES_IMU_DATA::ID => {
34417                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34418            }
34419            HIGH_LATENCY_DATA::ID => {
34420                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34421            }
34422            HIGH_LATENCY2_DATA::ID => {
34423                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34424            }
34425            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34426                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34427            }
34428            HIL_CONTROLS_DATA::ID => {
34429                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34430            }
34431            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34432            HIL_OPTICAL_FLOW_DATA::ID => {
34433                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34434            }
34435            HIL_RC_INPUTS_RAW_DATA::ID => {
34436                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34437            }
34438            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34439            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34440            HIL_STATE_QUATERNION_DATA::ID => {
34441                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34442            }
34443            HOME_POSITION_DATA::ID => {
34444                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34445            }
34446            HYGROMETER_SENSOR_DATA::ID => {
34447                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34448            }
34449            ILLUMINATOR_STATUS_DATA::ID => {
34450                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34451            }
34452            ISBD_LINK_STATUS_DATA::ID => {
34453                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34454            }
34455            LANDING_TARGET_DATA::ID => {
34456                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34457            }
34458            LINK_NODE_STATUS_DATA::ID => {
34459                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34460            }
34461            LOCAL_POSITION_NED_DATA::ID => {
34462                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34463            }
34464            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34465                .map(Self::LOCAL_POSITION_NED_COV),
34466            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34467                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34468                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34469            }
34470            LOGGING_ACK_DATA::ID => {
34471                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34472            }
34473            LOGGING_DATA_DATA::ID => {
34474                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34475            }
34476            LOGGING_DATA_ACKED_DATA::ID => {
34477                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34478            }
34479            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34480            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34481            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34482            LOG_REQUEST_DATA_DATA::ID => {
34483                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34484            }
34485            LOG_REQUEST_END_DATA::ID => {
34486                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34487            }
34488            LOG_REQUEST_LIST_DATA::ID => {
34489                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34490            }
34491            MAG_CAL_REPORT_DATA::ID => {
34492                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34493            }
34494            MANUAL_CONTROL_DATA::ID => {
34495                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34496            }
34497            MANUAL_SETPOINT_DATA::ID => {
34498                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34499            }
34500            MEMORY_VECT_DATA::ID => {
34501                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34502            }
34503            MESSAGE_INTERVAL_DATA::ID => {
34504                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34505            }
34506            MISSION_ACK_DATA::ID => {
34507                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34508            }
34509            MISSION_CLEAR_ALL_DATA::ID => {
34510                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34511            }
34512            MISSION_COUNT_DATA::ID => {
34513                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34514            }
34515            MISSION_CURRENT_DATA::ID => {
34516                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34517            }
34518            MISSION_ITEM_DATA::ID => {
34519                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34520            }
34521            MISSION_ITEM_INT_DATA::ID => {
34522                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34523            }
34524            MISSION_ITEM_REACHED_DATA::ID => {
34525                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34526            }
34527            MISSION_REQUEST_DATA::ID => {
34528                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34529            }
34530            MISSION_REQUEST_INT_DATA::ID => {
34531                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34532            }
34533            MISSION_REQUEST_LIST_DATA::ID => {
34534                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34535            }
34536            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34537                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34538                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34539            }
34540            MISSION_SET_CURRENT_DATA::ID => {
34541                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34542            }
34543            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34544                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34545                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34546            }
34547            MOUNT_ORIENTATION_DATA::ID => {
34548                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34549            }
34550            NAMED_VALUE_FLOAT_DATA::ID => {
34551                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34552            }
34553            NAMED_VALUE_INT_DATA::ID => {
34554                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34555            }
34556            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34557                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34558            }
34559            OBSTACLE_DISTANCE_DATA::ID => {
34560                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34561            }
34562            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34563            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34564                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34565                    .map(Self::ONBOARD_COMPUTER_STATUS)
34566            }
34567            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34568                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34569                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34570            }
34571            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34572                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34573                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34574            }
34575            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34576                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34577            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34578                .map(Self::OPEN_DRONE_ID_LOCATION),
34579            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34580                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34581                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34582            }
34583            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34584                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34585                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34586            }
34587            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34588                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34589            }
34590            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34591                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34592            }
34593            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34594                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34595                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34596            }
34597            OPTICAL_FLOW_DATA::ID => {
34598                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34599            }
34600            OPTICAL_FLOW_RAD_DATA::ID => {
34601                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34602            }
34603            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34604                .map(Self::ORBIT_EXECUTION_STATUS),
34605            PARAM_EXT_ACK_DATA::ID => {
34606                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34607            }
34608            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34609                .map(Self::PARAM_EXT_REQUEST_LIST),
34610            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34611                .map(Self::PARAM_EXT_REQUEST_READ),
34612            PARAM_EXT_SET_DATA::ID => {
34613                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34614            }
34615            PARAM_EXT_VALUE_DATA::ID => {
34616                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34617            }
34618            PARAM_MAP_RC_DATA::ID => {
34619                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34620            }
34621            PARAM_REQUEST_LIST_DATA::ID => {
34622                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34623            }
34624            PARAM_REQUEST_READ_DATA::ID => {
34625                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34626            }
34627            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34628            PARAM_VALUE_DATA::ID => {
34629                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34630            }
34631            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34632            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34633            PLAY_TUNE_V2_DATA::ID => {
34634                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34635            }
34636            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34637                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34638                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34639            }
34640            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34641                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34642                    .map(Self::POSITION_TARGET_LOCAL_NED)
34643            }
34644            POWER_STATUS_DATA::ID => {
34645                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34646            }
34647            PROTOCOL_VERSION_DATA::ID => {
34648                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34649            }
34650            RADIO_STATUS_DATA::ID => {
34651                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34652            }
34653            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34654            RAW_PRESSURE_DATA::ID => {
34655                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34656            }
34657            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34658            RC_CHANNELS_DATA::ID => {
34659                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34660            }
34661            RC_CHANNELS_OVERRIDE_DATA::ID => {
34662                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34663            }
34664            RC_CHANNELS_RAW_DATA::ID => {
34665                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34666            }
34667            RC_CHANNELS_SCALED_DATA::ID => {
34668                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34669            }
34670            REQUEST_DATA_STREAM_DATA::ID => {
34671                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34672            }
34673            REQUEST_EVENT_DATA::ID => {
34674                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34675            }
34676            RESOURCE_REQUEST_DATA::ID => {
34677                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34678            }
34679            RESPONSE_EVENT_ERROR_DATA::ID => {
34680                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34681            }
34682            SAFETY_ALLOWED_AREA_DATA::ID => {
34683                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34684            }
34685            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34686                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34687                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34688            }
34689            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34690            SCALED_IMU2_DATA::ID => {
34691                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34692            }
34693            SCALED_IMU3_DATA::ID => {
34694                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34695            }
34696            SCALED_PRESSURE_DATA::ID => {
34697                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34698            }
34699            SCALED_PRESSURE2_DATA::ID => {
34700                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34701            }
34702            SCALED_PRESSURE3_DATA::ID => {
34703                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34704            }
34705            SERIAL_CONTROL_DATA::ID => {
34706                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34707            }
34708            SERVO_OUTPUT_RAW_DATA::ID => {
34709                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34710            }
34711            SETUP_SIGNING_DATA::ID => {
34712                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34713            }
34714            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34715                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34716                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34717            }
34718            SET_ATTITUDE_TARGET_DATA::ID => {
34719                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34720            }
34721            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34722                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34723            }
34724            SET_HOME_POSITION_DATA::ID => {
34725                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34726            }
34727            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34728            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34729                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34730                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34731            }
34732            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34733                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34734                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34735            }
34736            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34737            SMART_BATTERY_INFO_DATA::ID => {
34738                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34739            }
34740            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34741            STORAGE_INFORMATION_DATA::ID => {
34742                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34743            }
34744            SUPPORTED_TUNES_DATA::ID => {
34745                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34746            }
34747            SYSTEM_TIME_DATA::ID => {
34748                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34749            }
34750            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34751            TERRAIN_CHECK_DATA::ID => {
34752                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34753            }
34754            TERRAIN_DATA_DATA::ID => {
34755                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34756            }
34757            TERRAIN_REPORT_DATA::ID => {
34758                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34759            }
34760            TERRAIN_REQUEST_DATA::ID => {
34761                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34762            }
34763            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34764            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34765                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34766                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34767            }
34768            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34769                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34770                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34771            }
34772            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34773                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34774                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34775            }
34776            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34777            UAVCAN_NODE_INFO_DATA::ID => {
34778                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34779            }
34780            UAVCAN_NODE_STATUS_DATA::ID => {
34781                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34782            }
34783            UAVIONIX_ADSB_GET_DATA::ID => {
34784                UAVIONIX_ADSB_GET_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_GET)
34785            }
34786            UAVIONIX_ADSB_OUT_CFG_DATA::ID => {
34787                UAVIONIX_ADSB_OUT_CFG_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_OUT_CFG)
34788            }
34789            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
34790                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::deser(version, payload)
34791                    .map(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID)
34792            }
34793            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
34794                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::deser(version, payload)
34795                    .map(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION)
34796            }
34797            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => {
34798                UAVIONIX_ADSB_OUT_CONTROL_DATA::deser(version, payload)
34799                    .map(Self::UAVIONIX_ADSB_OUT_CONTROL)
34800            }
34801            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => {
34802                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::deser(version, payload)
34803                    .map(Self::UAVIONIX_ADSB_OUT_DYNAMIC)
34804            }
34805            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => {
34806                UAVIONIX_ADSB_OUT_STATUS_DATA::deser(version, payload)
34807                    .map(Self::UAVIONIX_ADSB_OUT_STATUS)
34808            }
34809            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
34810                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::deser(version, payload)
34811                    .map(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT)
34812            }
34813            UTM_GLOBAL_POSITION_DATA::ID => {
34814                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34815            }
34816            V2_EXTENSION_DATA::ID => {
34817                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34818            }
34819            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34820            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34821            VICON_POSITION_ESTIMATE_DATA::ID => {
34822                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34823                    .map(Self::VICON_POSITION_ESTIMATE)
34824            }
34825            VIDEO_STREAM_INFORMATION_DATA::ID => {
34826                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34827                    .map(Self::VIDEO_STREAM_INFORMATION)
34828            }
34829            VIDEO_STREAM_STATUS_DATA::ID => {
34830                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34831            }
34832            VISION_POSITION_ESTIMATE_DATA::ID => {
34833                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34834                    .map(Self::VISION_POSITION_ESTIMATE)
34835            }
34836            VISION_SPEED_ESTIMATE_DATA::ID => {
34837                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34838            }
34839            WHEEL_DISTANCE_DATA::ID => {
34840                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34841            }
34842            WIFI_CONFIG_AP_DATA::ID => {
34843                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34844            }
34845            WINCH_STATUS_DATA::ID => {
34846                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34847            }
34848            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34849            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34850        }
34851    }
34852    fn message_name(&self) -> &'static str {
34853        match self {
34854            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34855            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34856            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34857            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34858            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34859            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34860            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34861            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34862            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34863            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34864            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34865            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34866                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34867            }
34868            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34869            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34870            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34871            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34872            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34873            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34874            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34875            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34876            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34877            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34878            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34879            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34880            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34881            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34882            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34883            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34884            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34885            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34886            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34887            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34888            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34889            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34890            Self::COLLISION(..) => COLLISION_DATA::NAME,
34891            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34892            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34893            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34894            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34895            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34896            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34897            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34898            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34899            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34900            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34901            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34902            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34903            Self::DEBUG(..) => DEBUG_DATA::NAME,
34904            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34905            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34906            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34907            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34908            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34909            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34910            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34911            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34912            Self::EVENT(..) => EVENT_DATA::NAME,
34913            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34914            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34915            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34916            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34917            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34918            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34919            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34920            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34921            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34922            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34923            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34924            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34925            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34926                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34927            }
34928            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34929            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34930            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34931            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34932            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34933            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34934            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34935            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34936            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34937            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34938            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34939            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34940            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34941            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34942            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34943            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34944            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34945            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34946            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34947            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34948            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34949            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34950            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34951            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34952            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34953            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34954            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34955            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34956            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34957            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34958            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34959            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34960            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34961            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34962            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34963                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34964            }
34965            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34966            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34967            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34968            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34969            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34970            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34971            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34972            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34973            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34974            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34975            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34976            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34977            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34978            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34979            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34980            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34981            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34982            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34983            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34984            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34985            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34986            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34987            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34988            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34989            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34990            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34991            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34992            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34993            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34994            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34995            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34996            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34997            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34998            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34999            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35000            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35001            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35002            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35003            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35004            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35005            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35006            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35007            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35008            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35009            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35010            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35011            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35012            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35013            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35014            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35015            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35016            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35017            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35018            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35019            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35020            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35021            Self::PING(..) => PING_DATA::NAME,
35022            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35023            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35024            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35025            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35026            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35027            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35028            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35029            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35030            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35031            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35032            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35033            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35034            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35035            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35036            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35037            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35038            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35039            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35040            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35041            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35042            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35043            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35044            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35045            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35046            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35047            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35048            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35049            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35050            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35051            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35052            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35053            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35054            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35055            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35056            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35057            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35058            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35059            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35060            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35061            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35062            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35063            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35064            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35065            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35066            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35067            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35068            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35069            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35070            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35071            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35072                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35073            }
35074            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35075                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35076            }
35077            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35078            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35079            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35080            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::NAME,
35081            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
35082            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
35083            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
35084                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME
35085            }
35086            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
35087            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
35088            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
35089            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
35090                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME
35091            }
35092            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35093            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35094            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35095            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35096            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35097            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35098            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35099            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35100            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35101            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35102            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35103            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35104            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35105        }
35106    }
35107    fn message_id(&self) -> u32 {
35108        match self {
35109            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35110            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35111            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35112            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35113            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35114            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35115            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35116            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35117            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35118            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35119            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35120            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35121                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35122            }
35123            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35124            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35125            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35126            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35127            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35128            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35129            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35130            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35131            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35132            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35133            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35134            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35135            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35136            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35137            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35138            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35139            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35140            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35141            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35142            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35143            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35144            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35145            Self::COLLISION(..) => COLLISION_DATA::ID,
35146            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35147            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35148            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35149            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35150            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35151            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35152            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35153            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35154            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35155            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35156            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35157            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35158            Self::DEBUG(..) => DEBUG_DATA::ID,
35159            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35160            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35161            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35162            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35163            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35164            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35165            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35166            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35167            Self::EVENT(..) => EVENT_DATA::ID,
35168            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35169            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35170            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35171            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35172            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35173            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35174            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35175            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35176            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35177            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35178            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35179            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35180            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35181                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35182            }
35183            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35184            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35185            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35186            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35187            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35188            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35189            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35190            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35191            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35192            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35193            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35194            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35195            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35196            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35197            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35198            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35199            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35200            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35201            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35202            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35203            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35204            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35205            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35206            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35207            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35208            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35209            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35210            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35211            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35212            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35213            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35214            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35215            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35216            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35217            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35218                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35219            }
35220            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35221            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35222            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35223            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35224            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35225            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35226            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35227            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35228            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35229            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35230            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35231            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35232            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35233            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35234            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35235            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35236            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35237            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35238            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35239            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35240            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35241            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35242            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35243            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35244            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35245            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35246            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35247            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35248            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35249            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35250            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35251            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35252            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35253            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35254            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35255            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35256            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35257            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35258            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35259            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35260            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35261            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35262            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35263            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35264            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35265            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35266            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35267            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35268            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35269            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35270            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35271            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35272            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35273            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35274            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35275            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35276            Self::PING(..) => PING_DATA::ID,
35277            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35278            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35279            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35280            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35281            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35282            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35283            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35284            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35285            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35286            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35287            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35288            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35289            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35290            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35291            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35292            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35293            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35294            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35295            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35296            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35297            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35298            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35299            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35300            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35301            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35302            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35303            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35304            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35305            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35306            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35307            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35308            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35309            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35310            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35311            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35312            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35313            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35314            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35315            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35316            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35317            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35318            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35319            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35320            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35321            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35322            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35323            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35324            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35325            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35326            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35327            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35328                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35329            }
35330            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35331            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35332            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35333            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::ID,
35334            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::ID,
35335            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
35336            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
35337                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID
35338            }
35339            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
35340            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
35341            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
35342            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
35343                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID
35344            }
35345            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35346            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35347            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35348            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35349            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35350            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35351            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35352            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35353            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35354            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35355            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35356            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35357            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35358        }
35359    }
35360    fn message_id_from_name(name: &str) -> Option<u32> {
35361        match name {
35362            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35363            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35364            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35365            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35366            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35367            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35368            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35369            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35370            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35371            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35372            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35373            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35374                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35375            }
35376            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35377            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35378            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35379            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35380            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35381            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35382            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35383            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35384            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35385            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35386            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35387            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35388            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35389            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35390            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35391            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35392            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35393            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35394            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35395            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35396            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35397            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35398            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35399            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35400            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35401            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35402            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35403            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35404            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35405            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35406            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35407            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35408            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35409            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35410            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35411            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35412            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35413            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35414            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35415            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35416            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35417            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35418            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35419            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35420            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35421            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35422            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35423            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35424            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35425            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35426            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35427            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35428            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35429                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35430            }
35431            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35432            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35433            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35434            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35435            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35436                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35437            }
35438            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35439            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35440            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35441            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35442            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35443                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35444            }
35445            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35446            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35447            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35448            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35449            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35450            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35451            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35452            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35453            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35454            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35455            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35456            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35457            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35458            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35459            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35460            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35461            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35462            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35463            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35464            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35465            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35466            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35467            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35468            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35469            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35470            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35471            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35472            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35473            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35474            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35475                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35476            }
35477            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35478            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35479            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35480            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35481            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35482            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35483            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35484            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35485            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35486            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35487            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35488            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35489            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35490            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35491            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35492            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35493            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35494            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35495            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35496            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35497            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35498            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35499            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35500            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35501            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35502            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35503            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35504            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35505            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35506            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35507            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35508            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35509            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35510            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35511            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35512            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35513            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35514            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35515            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35516            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35517            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35518            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35519            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35520            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35521            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35522            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35523            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35524            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35525            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35526            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35527            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35528            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35529            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35530            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35531            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35532            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35533            PING_DATA::NAME => Some(PING_DATA::ID),
35534            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35535            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35536            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35537            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35538            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35539            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35540            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35541            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35542            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35543            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35544            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35545            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35546            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35547            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35548            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35549            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35550            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35551            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35552            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35553            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35554            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35555            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35556            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35557            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35558            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35559            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35560            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35561            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35562            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35563            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35564            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35565            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35566            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35567            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35568            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35569                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35570            }
35571            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35572                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35573            }
35574            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35575            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35576            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35577            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35578            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35579            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35580            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35581            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35582            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35583            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35584            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35585            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35586            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35587            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35588                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35589            }
35590            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35591                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35592            }
35593            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35594            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35595            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35596            UAVIONIX_ADSB_GET_DATA::NAME => Some(UAVIONIX_ADSB_GET_DATA::ID),
35597            UAVIONIX_ADSB_OUT_CFG_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CFG_DATA::ID),
35598            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME => {
35599                Some(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID)
35600            }
35601            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME => {
35602                Some(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID)
35603            }
35604            UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CONTROL_DATA::ID),
35605            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME => Some(UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID),
35606            UAVIONIX_ADSB_OUT_STATUS_DATA::NAME => Some(UAVIONIX_ADSB_OUT_STATUS_DATA::ID),
35607            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME => {
35608                Some(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID)
35609            }
35610            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35611            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35612            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35613            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35614            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35615            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35616            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35617            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35618            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35619            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35620            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35621            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35622            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35623            _ => None,
35624        }
35625    }
35626    fn default_message_from_id(id: u32) -> Option<Self> {
35627        match id {
35628            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35629                ACTUATOR_CONTROL_TARGET_DATA::default(),
35630            )),
35631            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35632                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35633            )),
35634            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35635            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35636            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35637            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35638            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35639                ATTITUDE_QUATERNION_DATA::default(),
35640            )),
35641            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35642                ATTITUDE_QUATERNION_COV_DATA::default(),
35643            )),
35644            ATTITUDE_TARGET_DATA::ID => {
35645                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35646            }
35647            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35648            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35649            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35650                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35651                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35652                ))
35653            }
35654            AUTOPILOT_VERSION_DATA::ID => {
35655                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35656            }
35657            AVAILABLE_MODES_DATA::ID => {
35658                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35659            }
35660            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35661                AVAILABLE_MODES_MONITOR_DATA::default(),
35662            )),
35663            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35664            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35665            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35666            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35667                CAMERA_CAPTURE_STATUS_DATA::default(),
35668            )),
35669            CAMERA_FOV_STATUS_DATA::ID => {
35670                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35671            }
35672            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35673                CAMERA_IMAGE_CAPTURED_DATA::default(),
35674            )),
35675            CAMERA_INFORMATION_DATA::ID => {
35676                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35677            }
35678            CAMERA_SETTINGS_DATA::ID => {
35679                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35680            }
35681            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35682                CAMERA_THERMAL_RANGE_DATA::default(),
35683            )),
35684            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35685                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35686            )),
35687            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35688                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35689            )),
35690            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35691            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35692            CAN_FILTER_MODIFY_DATA::ID => {
35693                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35694            }
35695            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35696            CELLULAR_CONFIG_DATA::ID => {
35697                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35698            }
35699            CELLULAR_STATUS_DATA::ID => {
35700                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35701            }
35702            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35703                CHANGE_OPERATOR_CONTROL_DATA::default(),
35704            )),
35705            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35706                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35707            )),
35708            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35709            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35710            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35711            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35712            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35713            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35714                COMPONENT_INFORMATION_DATA::default(),
35715            )),
35716            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35717                COMPONENT_INFORMATION_BASIC_DATA::default(),
35718            )),
35719            COMPONENT_METADATA_DATA::ID => {
35720                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35721            }
35722            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35723                CONTROL_SYSTEM_STATE_DATA::default(),
35724            )),
35725            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35726                CURRENT_EVENT_SEQUENCE_DATA::default(),
35727            )),
35728            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35729            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35730            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35731                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35732            )),
35733            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35734            DEBUG_FLOAT_ARRAY_DATA::ID => {
35735                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35736            }
35737            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35738            DISTANCE_SENSOR_DATA::ID => {
35739                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35740            }
35741            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35742            ENCAPSULATED_DATA_DATA::ID => {
35743                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35744            }
35745            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35746            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35747            ESTIMATOR_STATUS_DATA::ID => {
35748                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35749            }
35750            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35751            EXTENDED_SYS_STATE_DATA::ID => {
35752                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35753            }
35754            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35755            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35756                FILE_TRANSFER_PROTOCOL_DATA::default(),
35757            )),
35758            FLIGHT_INFORMATION_DATA::ID => {
35759                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35760            }
35761            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35762            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35763            GENERATOR_STATUS_DATA::ID => {
35764                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35765            }
35766            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35767                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35768            )),
35769            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35770                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35771            )),
35772            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35773                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35774            )),
35775            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35776                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35777            )),
35778            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35779                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35780            )),
35781            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35782                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35783                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35784                ))
35785            }
35786            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35787                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35788            )),
35789            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35790                GIMBAL_MANAGER_STATUS_DATA::default(),
35791            )),
35792            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35793                GLOBAL_POSITION_INT_DATA::default(),
35794            )),
35795            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35796                GLOBAL_POSITION_INT_COV_DATA::default(),
35797            )),
35798            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35799                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35800                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35801                ))
35802            }
35803            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35804            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35805            GPS_GLOBAL_ORIGIN_DATA::ID => {
35806                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35807            }
35808            GPS_INJECT_DATA_DATA::ID => {
35809                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35810            }
35811            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35812            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35813            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35814            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35815            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35816            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35817            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35818            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35819            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35820            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35821                HIL_ACTUATOR_CONTROLS_DATA::default(),
35822            )),
35823            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35824            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35825            HIL_OPTICAL_FLOW_DATA::ID => {
35826                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35827            }
35828            HIL_RC_INPUTS_RAW_DATA::ID => {
35829                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35830            }
35831            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35832            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35833            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35834                HIL_STATE_QUATERNION_DATA::default(),
35835            )),
35836            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35837            HYGROMETER_SENSOR_DATA::ID => {
35838                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35839            }
35840            ILLUMINATOR_STATUS_DATA::ID => {
35841                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35842            }
35843            ISBD_LINK_STATUS_DATA::ID => {
35844                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35845            }
35846            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35847            LINK_NODE_STATUS_DATA::ID => {
35848                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35849            }
35850            LOCAL_POSITION_NED_DATA::ID => {
35851                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35852            }
35853            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35854                LOCAL_POSITION_NED_COV_DATA::default(),
35855            )),
35856            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35857                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35858                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35859                ))
35860            }
35861            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35862            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35863            LOGGING_DATA_ACKED_DATA::ID => {
35864                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35865            }
35866            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35867            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35868            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35869            LOG_REQUEST_DATA_DATA::ID => {
35870                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35871            }
35872            LOG_REQUEST_END_DATA::ID => {
35873                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35874            }
35875            LOG_REQUEST_LIST_DATA::ID => {
35876                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35877            }
35878            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35879            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35880            MANUAL_SETPOINT_DATA::ID => {
35881                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35882            }
35883            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35884            MESSAGE_INTERVAL_DATA::ID => {
35885                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35886            }
35887            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35888            MISSION_CLEAR_ALL_DATA::ID => {
35889                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35890            }
35891            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35892            MISSION_CURRENT_DATA::ID => {
35893                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35894            }
35895            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35896            MISSION_ITEM_INT_DATA::ID => {
35897                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35898            }
35899            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35900                MISSION_ITEM_REACHED_DATA::default(),
35901            )),
35902            MISSION_REQUEST_DATA::ID => {
35903                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35904            }
35905            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35906                MISSION_REQUEST_INT_DATA::default(),
35907            )),
35908            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35909                MISSION_REQUEST_LIST_DATA::default(),
35910            )),
35911            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35912                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35913            )),
35914            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35915                MISSION_SET_CURRENT_DATA::default(),
35916            )),
35917            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35918                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35919            )),
35920            MOUNT_ORIENTATION_DATA::ID => {
35921                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35922            }
35923            NAMED_VALUE_FLOAT_DATA::ID => {
35924                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35925            }
35926            NAMED_VALUE_INT_DATA::ID => {
35927                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35928            }
35929            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35930                NAV_CONTROLLER_OUTPUT_DATA::default(),
35931            )),
35932            OBSTACLE_DISTANCE_DATA::ID => {
35933                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35934            }
35935            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35936            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35937                ONBOARD_COMPUTER_STATUS_DATA::default(),
35938            )),
35939            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35940                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35941            )),
35942            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35943                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35944            )),
35945            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35946                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35947            )),
35948            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35949                OPEN_DRONE_ID_LOCATION_DATA::default(),
35950            )),
35951            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35952                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35953            )),
35954            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35955                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35956            )),
35957            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35958                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35959            )),
35960            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35961                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35962            )),
35963            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35964                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35965            )),
35966            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35967            OPTICAL_FLOW_RAD_DATA::ID => {
35968                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35969            }
35970            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35971                ORBIT_EXECUTION_STATUS_DATA::default(),
35972            )),
35973            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35974            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35975                PARAM_EXT_REQUEST_LIST_DATA::default(),
35976            )),
35977            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35978                PARAM_EXT_REQUEST_READ_DATA::default(),
35979            )),
35980            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35981            PARAM_EXT_VALUE_DATA::ID => {
35982                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35983            }
35984            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35985            PARAM_REQUEST_LIST_DATA::ID => {
35986                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35987            }
35988            PARAM_REQUEST_READ_DATA::ID => {
35989                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35990            }
35991            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35992            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35993            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35994            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35995            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35996            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35997                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35998            )),
35999            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36000                POSITION_TARGET_LOCAL_NED_DATA::default(),
36001            )),
36002            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36003            PROTOCOL_VERSION_DATA::ID => {
36004                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36005            }
36006            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36007            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36008            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36009            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36010            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36011            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36012                RC_CHANNELS_OVERRIDE_DATA::default(),
36013            )),
36014            RC_CHANNELS_RAW_DATA::ID => {
36015                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36016            }
36017            RC_CHANNELS_SCALED_DATA::ID => {
36018                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36019            }
36020            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36021                REQUEST_DATA_STREAM_DATA::default(),
36022            )),
36023            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36024            RESOURCE_REQUEST_DATA::ID => {
36025                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36026            }
36027            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36028                RESPONSE_EVENT_ERROR_DATA::default(),
36029            )),
36030            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36031                SAFETY_ALLOWED_AREA_DATA::default(),
36032            )),
36033            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36034                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36035            )),
36036            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36037            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36038            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36039            SCALED_PRESSURE_DATA::ID => {
36040                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36041            }
36042            SCALED_PRESSURE2_DATA::ID => {
36043                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36044            }
36045            SCALED_PRESSURE3_DATA::ID => {
36046                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36047            }
36048            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36049            SERVO_OUTPUT_RAW_DATA::ID => {
36050                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36051            }
36052            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36053            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36054                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36055            )),
36056            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36057                SET_ATTITUDE_TARGET_DATA::default(),
36058            )),
36059            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36060                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36061            )),
36062            SET_HOME_POSITION_DATA::ID => {
36063                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36064            }
36065            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36066            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36067                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36068            )),
36069            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36070                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36071            )),
36072            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36073            SMART_BATTERY_INFO_DATA::ID => {
36074                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36075            }
36076            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36077            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36078                STORAGE_INFORMATION_DATA::default(),
36079            )),
36080            SUPPORTED_TUNES_DATA::ID => {
36081                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36082            }
36083            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36084            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36085            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36086            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36087            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36088            TERRAIN_REQUEST_DATA::ID => {
36089                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36090            }
36091            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36092            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36093                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36094            )),
36095            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36096                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36097                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36098                ))
36099            }
36100            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36101                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36102                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36103                ))
36104            }
36105            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36106            UAVCAN_NODE_INFO_DATA::ID => {
36107                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36108            }
36109            UAVCAN_NODE_STATUS_DATA::ID => {
36110                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36111            }
36112            UAVIONIX_ADSB_GET_DATA::ID => {
36113                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::default()))
36114            }
36115            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
36116                UAVIONIX_ADSB_OUT_CFG_DATA::default(),
36117            )),
36118            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
36119                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::default(),
36120            )),
36121            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
36122                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
36123                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::default(),
36124                ))
36125            }
36126            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
36127                UAVIONIX_ADSB_OUT_CONTROL_DATA::default(),
36128            )),
36129            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
36130                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::default(),
36131            )),
36132            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
36133                UAVIONIX_ADSB_OUT_STATUS_DATA::default(),
36134            )),
36135            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
36136                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
36137                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::default(),
36138                ))
36139            }
36140            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36141                UTM_GLOBAL_POSITION_DATA::default(),
36142            )),
36143            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36144            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36145            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36146            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36147                VICON_POSITION_ESTIMATE_DATA::default(),
36148            )),
36149            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36150                VIDEO_STREAM_INFORMATION_DATA::default(),
36151            )),
36152            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36153                VIDEO_STREAM_STATUS_DATA::default(),
36154            )),
36155            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36156                VISION_POSITION_ESTIMATE_DATA::default(),
36157            )),
36158            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36159                VISION_SPEED_ESTIMATE_DATA::default(),
36160            )),
36161            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36162            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36163            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36164            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36165            _ => None,
36166        }
36167    }
36168    #[cfg(feature = "arbitrary")]
36169    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36170        match id {
36171            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36172                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36173            )),
36174            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36175                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36176            )),
36177            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36178            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36179            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36180            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36181            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36182                ATTITUDE_QUATERNION_DATA::random(rng),
36183            )),
36184            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36185                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36186            )),
36187            ATTITUDE_TARGET_DATA::ID => {
36188                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36189            }
36190            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36191            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36192            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36193                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36194                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36195                ))
36196            }
36197            AUTOPILOT_VERSION_DATA::ID => {
36198                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36199            }
36200            AVAILABLE_MODES_DATA::ID => {
36201                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36202            }
36203            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36204                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36205            )),
36206            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36207            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36208            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36209            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36210                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36211            )),
36212            CAMERA_FOV_STATUS_DATA::ID => {
36213                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36214            }
36215            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36216                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36217            )),
36218            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36219                CAMERA_INFORMATION_DATA::random(rng),
36220            )),
36221            CAMERA_SETTINGS_DATA::ID => {
36222                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36223            }
36224            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36225                CAMERA_THERMAL_RANGE_DATA::random(rng),
36226            )),
36227            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36228                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36229            )),
36230            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36231                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36232            )),
36233            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36234            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36235            CAN_FILTER_MODIFY_DATA::ID => {
36236                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36237            }
36238            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36239            CELLULAR_CONFIG_DATA::ID => {
36240                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36241            }
36242            CELLULAR_STATUS_DATA::ID => {
36243                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36244            }
36245            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36246                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36247            )),
36248            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36249                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36250            )),
36251            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36252            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36253            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36254            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36255            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36256            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36257                COMPONENT_INFORMATION_DATA::random(rng),
36258            )),
36259            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36260                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36261            )),
36262            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36263                COMPONENT_METADATA_DATA::random(rng),
36264            )),
36265            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36266                CONTROL_SYSTEM_STATE_DATA::random(rng),
36267            )),
36268            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36269                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36270            )),
36271            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36272            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36273            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36274                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36275            )),
36276            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36277            DEBUG_FLOAT_ARRAY_DATA::ID => {
36278                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36279            }
36280            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36281            DISTANCE_SENSOR_DATA::ID => {
36282                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36283            }
36284            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36285            ENCAPSULATED_DATA_DATA::ID => {
36286                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36287            }
36288            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36289            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36290            ESTIMATOR_STATUS_DATA::ID => {
36291                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36292            }
36293            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36294            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36295                EXTENDED_SYS_STATE_DATA::random(rng),
36296            )),
36297            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36298            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36299                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36300            )),
36301            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36302                FLIGHT_INFORMATION_DATA::random(rng),
36303            )),
36304            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36305            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36306            GENERATOR_STATUS_DATA::ID => {
36307                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36308            }
36309            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36310                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36311            )),
36312            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36313                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36314            )),
36315            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36316                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36317            )),
36318            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36319                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36320            )),
36321            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36322                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36323            )),
36324            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36325                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36326                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36327                ))
36328            }
36329            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36330                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36331            )),
36332            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36333                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36334            )),
36335            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36336                GLOBAL_POSITION_INT_DATA::random(rng),
36337            )),
36338            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36339                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36340            )),
36341            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36342                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36343                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36344                ))
36345            }
36346            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36347            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36348            GPS_GLOBAL_ORIGIN_DATA::ID => {
36349                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36350            }
36351            GPS_INJECT_DATA_DATA::ID => {
36352                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36353            }
36354            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36355            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36356            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36357            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36358            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36359            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36360            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36361            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36362            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36363            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36364                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36365            )),
36366            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36367            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36368            HIL_OPTICAL_FLOW_DATA::ID => {
36369                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36370            }
36371            HIL_RC_INPUTS_RAW_DATA::ID => {
36372                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36373            }
36374            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36375            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36376            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36377                HIL_STATE_QUATERNION_DATA::random(rng),
36378            )),
36379            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36380            HYGROMETER_SENSOR_DATA::ID => {
36381                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36382            }
36383            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36384                ILLUMINATOR_STATUS_DATA::random(rng),
36385            )),
36386            ISBD_LINK_STATUS_DATA::ID => {
36387                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36388            }
36389            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36390            LINK_NODE_STATUS_DATA::ID => {
36391                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36392            }
36393            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36394                LOCAL_POSITION_NED_DATA::random(rng),
36395            )),
36396            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36397                LOCAL_POSITION_NED_COV_DATA::random(rng),
36398            )),
36399            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36400                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36401                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36402                ))
36403            }
36404            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36405            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36406            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36407                LOGGING_DATA_ACKED_DATA::random(rng),
36408            )),
36409            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36410            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36411            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36412            LOG_REQUEST_DATA_DATA::ID => {
36413                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36414            }
36415            LOG_REQUEST_END_DATA::ID => {
36416                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36417            }
36418            LOG_REQUEST_LIST_DATA::ID => {
36419                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36420            }
36421            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36422            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36423            MANUAL_SETPOINT_DATA::ID => {
36424                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36425            }
36426            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36427            MESSAGE_INTERVAL_DATA::ID => {
36428                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36429            }
36430            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36431            MISSION_CLEAR_ALL_DATA::ID => {
36432                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36433            }
36434            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36435            MISSION_CURRENT_DATA::ID => {
36436                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36437            }
36438            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36439            MISSION_ITEM_INT_DATA::ID => {
36440                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36441            }
36442            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36443                MISSION_ITEM_REACHED_DATA::random(rng),
36444            )),
36445            MISSION_REQUEST_DATA::ID => {
36446                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36447            }
36448            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36449                MISSION_REQUEST_INT_DATA::random(rng),
36450            )),
36451            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36452                MISSION_REQUEST_LIST_DATA::random(rng),
36453            )),
36454            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36455                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36456            )),
36457            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36458                MISSION_SET_CURRENT_DATA::random(rng),
36459            )),
36460            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36461                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36462            )),
36463            MOUNT_ORIENTATION_DATA::ID => {
36464                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36465            }
36466            NAMED_VALUE_FLOAT_DATA::ID => {
36467                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36468            }
36469            NAMED_VALUE_INT_DATA::ID => {
36470                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36471            }
36472            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36473                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36474            )),
36475            OBSTACLE_DISTANCE_DATA::ID => {
36476                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36477            }
36478            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36479            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36480                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36481            )),
36482            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36483                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36484            )),
36485            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36486                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36487            )),
36488            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36489                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36490            )),
36491            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36492                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36493            )),
36494            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36495                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36496            )),
36497            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36498                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36499            )),
36500            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36501                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36502            )),
36503            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36504                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36505            )),
36506            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36507                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36508            )),
36509            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36510            OPTICAL_FLOW_RAD_DATA::ID => {
36511                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36512            }
36513            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36514                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36515            )),
36516            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36517            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36518                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36519            )),
36520            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36521                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36522            )),
36523            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36524            PARAM_EXT_VALUE_DATA::ID => {
36525                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36526            }
36527            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36528            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36529                PARAM_REQUEST_LIST_DATA::random(rng),
36530            )),
36531            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36532                PARAM_REQUEST_READ_DATA::random(rng),
36533            )),
36534            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36535            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36536            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36537            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36538            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36539            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36540                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36541            )),
36542            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36543                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36544            )),
36545            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36546            PROTOCOL_VERSION_DATA::ID => {
36547                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36548            }
36549            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36550            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36551            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36552            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36553            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36554            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36555                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36556            )),
36557            RC_CHANNELS_RAW_DATA::ID => {
36558                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36559            }
36560            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36561                RC_CHANNELS_SCALED_DATA::random(rng),
36562            )),
36563            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36564                REQUEST_DATA_STREAM_DATA::random(rng),
36565            )),
36566            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36567            RESOURCE_REQUEST_DATA::ID => {
36568                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36569            }
36570            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36571                RESPONSE_EVENT_ERROR_DATA::random(rng),
36572            )),
36573            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36574                SAFETY_ALLOWED_AREA_DATA::random(rng),
36575            )),
36576            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36577                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36578            )),
36579            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36580            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36581            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36582            SCALED_PRESSURE_DATA::ID => {
36583                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36584            }
36585            SCALED_PRESSURE2_DATA::ID => {
36586                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36587            }
36588            SCALED_PRESSURE3_DATA::ID => {
36589                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36590            }
36591            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36592            SERVO_OUTPUT_RAW_DATA::ID => {
36593                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36594            }
36595            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36596            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36597                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36598            )),
36599            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36600                SET_ATTITUDE_TARGET_DATA::random(rng),
36601            )),
36602            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36603                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36604            )),
36605            SET_HOME_POSITION_DATA::ID => {
36606                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36607            }
36608            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36609            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36610                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36611            )),
36612            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36613                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36614            )),
36615            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36616            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36617                SMART_BATTERY_INFO_DATA::random(rng),
36618            )),
36619            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36620            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36621                STORAGE_INFORMATION_DATA::random(rng),
36622            )),
36623            SUPPORTED_TUNES_DATA::ID => {
36624                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36625            }
36626            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36627            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36628            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36629            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36630            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36631            TERRAIN_REQUEST_DATA::ID => {
36632                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36633            }
36634            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36635            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36636                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36637            )),
36638            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36639                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36640                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36641                ))
36642            }
36643            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36644                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36645                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36646                ))
36647            }
36648            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36649            UAVCAN_NODE_INFO_DATA::ID => {
36650                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36651            }
36652            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36653                UAVCAN_NODE_STATUS_DATA::random(rng),
36654            )),
36655            UAVIONIX_ADSB_GET_DATA::ID => {
36656                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::random(rng)))
36657            }
36658            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
36659                UAVIONIX_ADSB_OUT_CFG_DATA::random(rng),
36660            )),
36661            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
36662                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::random(rng),
36663            )),
36664            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
36665                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
36666                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::random(rng),
36667                ))
36668            }
36669            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
36670                UAVIONIX_ADSB_OUT_CONTROL_DATA::random(rng),
36671            )),
36672            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
36673                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::random(rng),
36674            )),
36675            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
36676                UAVIONIX_ADSB_OUT_STATUS_DATA::random(rng),
36677            )),
36678            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
36679                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
36680                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::random(rng),
36681                ))
36682            }
36683            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36684                UTM_GLOBAL_POSITION_DATA::random(rng),
36685            )),
36686            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36687            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36688            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36689            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36690                VICON_POSITION_ESTIMATE_DATA::random(rng),
36691            )),
36692            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36693                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36694            )),
36695            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36696                VIDEO_STREAM_STATUS_DATA::random(rng),
36697            )),
36698            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36699                VISION_POSITION_ESTIMATE_DATA::random(rng),
36700            )),
36701            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36702                VISION_SPEED_ESTIMATE_DATA::random(rng),
36703            )),
36704            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36705            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36706            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36707            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36708            _ => None,
36709        }
36710    }
36711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36712        match self {
36713            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36714            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36715            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36716            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36717            Self::ALTITUDE(body) => body.ser(version, bytes),
36718            Self::ATTITUDE(body) => body.ser(version, bytes),
36719            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36720            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36721            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36722            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36723            Self::AUTH_KEY(body) => body.ser(version, bytes),
36724            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36725            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36726            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36727            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36728            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36729            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36730            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36731            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36732            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36733            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36734            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36735            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36736            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36737            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36738            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36739            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36740            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36741            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36742            Self::CAN_FRAME(body) => body.ser(version, bytes),
36743            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36744            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36745            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36746            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36747            Self::COLLISION(body) => body.ser(version, bytes),
36748            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36749            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36750            Self::COMMAND_INT(body) => body.ser(version, bytes),
36751            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36752            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36753            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36754            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36755            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36756            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36757            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36758            Self::DATA_STREAM(body) => body.ser(version, bytes),
36759            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36760            Self::DEBUG(body) => body.ser(version, bytes),
36761            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36762            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36763            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36764            Self::EFI_STATUS(body) => body.ser(version, bytes),
36765            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36766            Self::ESC_INFO(body) => body.ser(version, bytes),
36767            Self::ESC_STATUS(body) => body.ser(version, bytes),
36768            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36769            Self::EVENT(body) => body.ser(version, bytes),
36770            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36771            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36772            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36773            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36774            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36775            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36776            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36777            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36778            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36779            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36780            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36781            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36782            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36783            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36784            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36785            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36786            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36787            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36788            Self::GPS2_RAW(body) => body.ser(version, bytes),
36789            Self::GPS2_RTK(body) => body.ser(version, bytes),
36790            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36791            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36792            Self::GPS_INPUT(body) => body.ser(version, bytes),
36793            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36794            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36795            Self::GPS_RTK(body) => body.ser(version, bytes),
36796            Self::GPS_STATUS(body) => body.ser(version, bytes),
36797            Self::HEARTBEAT(body) => body.ser(version, bytes),
36798            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36799            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36800            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36801            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36802            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36803            Self::HIL_GPS(body) => body.ser(version, bytes),
36804            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36805            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36806            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36807            Self::HIL_STATE(body) => body.ser(version, bytes),
36808            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36809            Self::HOME_POSITION(body) => body.ser(version, bytes),
36810            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36811            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36812            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36813            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36814            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36815            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36816            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36817            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36818            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36819            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36820            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36821            Self::LOG_DATA(body) => body.ser(version, bytes),
36822            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36823            Self::LOG_ERASE(body) => body.ser(version, bytes),
36824            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36825            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36826            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36827            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36828            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36829            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36830            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36831            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36832            Self::MISSION_ACK(body) => body.ser(version, bytes),
36833            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36834            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36835            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36836            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36837            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36838            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36839            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36840            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36841            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36842            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36843            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36844            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36845            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36846            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36847            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36848            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36849            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36850            Self::ODOMETRY(body) => body.ser(version, bytes),
36851            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36852            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36853            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36854            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36855            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36856            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36857            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36858            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36859            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36860            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36861            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36862            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36863            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36864            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36865            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36866            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36867            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36868            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36869            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36870            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36871            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36872            Self::PARAM_SET(body) => body.ser(version, bytes),
36873            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36874            Self::PING(body) => body.ser(version, bytes),
36875            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36876            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36877            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36878            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36879            Self::POWER_STATUS(body) => body.ser(version, bytes),
36880            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36881            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36882            Self::RAW_IMU(body) => body.ser(version, bytes),
36883            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36884            Self::RAW_RPM(body) => body.ser(version, bytes),
36885            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36886            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36887            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36888            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36889            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36890            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36891            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36892            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36893            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36894            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36895            Self::SCALED_IMU(body) => body.ser(version, bytes),
36896            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36897            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36898            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36899            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36900            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36901            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36902            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36903            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36904            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36905            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36906            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36907            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36908            Self::SET_MODE(body) => body.ser(version, bytes),
36909            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36910            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36911            Self::SIM_STATE(body) => body.ser(version, bytes),
36912            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36913            Self::STATUSTEXT(body) => body.ser(version, bytes),
36914            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36915            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36916            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36917            Self::SYS_STATUS(body) => body.ser(version, bytes),
36918            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36919            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36920            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36921            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36922            Self::TIMESYNC(body) => body.ser(version, bytes),
36923            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36924            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36925            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36926            Self::TUNNEL(body) => body.ser(version, bytes),
36927            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36928            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36929            Self::UAVIONIX_ADSB_GET(body) => body.ser(version, bytes),
36930            Self::UAVIONIX_ADSB_OUT_CFG(body) => body.ser(version, bytes),
36931            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(body) => body.ser(version, bytes),
36932            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(body) => body.ser(version, bytes),
36933            Self::UAVIONIX_ADSB_OUT_CONTROL(body) => body.ser(version, bytes),
36934            Self::UAVIONIX_ADSB_OUT_DYNAMIC(body) => body.ser(version, bytes),
36935            Self::UAVIONIX_ADSB_OUT_STATUS(body) => body.ser(version, bytes),
36936            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(body) => body.ser(version, bytes),
36937            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36938            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36939            Self::VFR_HUD(body) => body.ser(version, bytes),
36940            Self::VIBRATION(body) => body.ser(version, bytes),
36941            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36942            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36943            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36944            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36945            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36946            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36947            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36948            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36949            Self::WIND_COV(body) => body.ser(version, bytes),
36950        }
36951    }
36952    fn extra_crc(id: u32) -> u8 {
36953        match id {
36954            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36955            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36956            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36957            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36958            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36959            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36960            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36961            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36962            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36963            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36964            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36965            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36966                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36967            }
36968            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36969            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36970            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36971            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36972            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36973            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36974            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36975            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36976            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36977            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36978            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36979            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36980            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36981            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36982            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36983            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36984            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36985            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36986            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36987            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36988            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36989            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36990            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36991            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36992            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36993            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36994            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36995            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36996            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36997            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36998            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36999            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37000            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37001            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37002            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37003            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37004            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37005            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37006            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37007            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37008            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37009            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37010            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37011            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37012            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37013            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37014            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37015            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37016            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37017            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37018            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37019            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37020            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37021            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37022            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37023            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37024            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37025            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37026                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37027            }
37028            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37029            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37030            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37031            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37032            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37033                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37034            }
37035            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37036            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37037            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37038            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37039            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37040            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37041            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37042            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37043            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37044            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37045            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37046            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37047            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37048            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37049            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37050            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37051            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37052            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37053            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37054            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37055            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37056            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37057            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37058            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37059            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37060            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37061            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37062            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37063            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37064            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37065                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37066            }
37067            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37068            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37069            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37070            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37071            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37072            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37073            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37074            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37075            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37076            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37077            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37078            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37079            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37080            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37081            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37082            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37083            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37084            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37085            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37086            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37087            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37088            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37089            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37090            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37091            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37092            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37093            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37094            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37095            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37096            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37097            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37098            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37099            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37100            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37101            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37102            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37103            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37104            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37105            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37106            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37107            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37108            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37109            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37110            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37111            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37112            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37113            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37114            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37115            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37116            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37117            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37118            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37119            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37120            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37121            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37122            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37123            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37124            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37125            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37126            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37127            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37128            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37129            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37130            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37131            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37132            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37133            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37134            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37135            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37136            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37137            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37138            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37139            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37140            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37141            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37142            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37143            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37144            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37145            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37146            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37147            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37148            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37149            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37150            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37151            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37152            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37153            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37154            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37155            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37156            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37157            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37158            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37159                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37160            }
37161            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37162            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37163            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37164            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37165            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37166            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37167            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37168            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37169            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37170            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37171            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37172            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37173            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37174            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37175            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37176                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37177            }
37178            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37179                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37180            }
37181            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37182            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37183            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37184            UAVIONIX_ADSB_GET_DATA::ID => UAVIONIX_ADSB_GET_DATA::EXTRA_CRC,
37185            UAVIONIX_ADSB_OUT_CFG_DATA::ID => UAVIONIX_ADSB_OUT_CFG_DATA::EXTRA_CRC,
37186            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
37187                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::EXTRA_CRC
37188            }
37189            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
37190                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::EXTRA_CRC
37191            }
37192            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => UAVIONIX_ADSB_OUT_CONTROL_DATA::EXTRA_CRC,
37193            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::EXTRA_CRC,
37194            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => UAVIONIX_ADSB_OUT_STATUS_DATA::EXTRA_CRC,
37195            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
37196                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::EXTRA_CRC
37197            }
37198            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37199            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37200            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37201            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37202            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37203            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37204            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37205            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37206            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37207            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37208            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37209            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37210            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37211            _ => 0,
37212        }
37213    }
37214    fn target_system_id(&self) -> Option<u8> {
37215        match self {
37216            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37217            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37218            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37219            Self::CAN_FRAME(inner) => Some(inner.target_system),
37220            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37221            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37222            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37223            Self::COMMAND_INT(inner) => Some(inner.target_system),
37224            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37225            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37226            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37227            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37228            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37229            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37230            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37231            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37232            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37233            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37234            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37235            Self::LOG_ERASE(inner) => Some(inner.target_system),
37236            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37237            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37238            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37239            Self::MISSION_ACK(inner) => Some(inner.target_system),
37240            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37241            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37242            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37243            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37244            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37245            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37246            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37247            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37248            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37249            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37250            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37251            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37252            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37253            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37254            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37255            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37256            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37257            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37258            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37259            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37260            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37261            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37262            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37263            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37264            Self::PARAM_SET(inner) => Some(inner.target_system),
37265            Self::PING(inner) => Some(inner.target_system),
37266            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37267            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37268            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37269            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37270            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37271            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37272            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37273            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37274            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37275            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37276            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37277            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37278            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37279            Self::SET_MODE(inner) => Some(inner.target_system),
37280            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37281            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37282            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37283            Self::TIMESYNC(inner) => Some(inner.target_system),
37284            Self::TUNNEL(inner) => Some(inner.target_system),
37285            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37286            _ => None,
37287        }
37288    }
37289    fn target_component_id(&self) -> Option<u8> {
37290        match self {
37291            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37292            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37293            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37294            Self::CAN_FRAME(inner) => Some(inner.target_component),
37295            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37296            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37297            Self::COMMAND_INT(inner) => Some(inner.target_component),
37298            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37299            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37300            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37301            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37302            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37303            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37304            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37305            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37306            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37307            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37308            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37309            Self::LOG_ERASE(inner) => Some(inner.target_component),
37310            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37311            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37312            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37313            Self::MISSION_ACK(inner) => Some(inner.target_component),
37314            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37315            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37316            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37317            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37318            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37319            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37320            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37321            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37322            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37323            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37324            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37325            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37326            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37327            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37328            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37329            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37330            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37331            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37332            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37333            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37334            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37335            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37336            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37337            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37338            Self::PARAM_SET(inner) => Some(inner.target_component),
37339            Self::PING(inner) => Some(inner.target_component),
37340            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37341            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37342            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37343            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37344            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37345            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37346            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37347            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37348            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37349            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37350            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37351            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37352            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37353            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37354            Self::TIMESYNC(inner) => Some(inner.target_component),
37355            Self::TUNNEL(inner) => Some(inner.target_component),
37356            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37357            _ => None,
37358        }
37359    }
37360}